npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@multimediafabrik/tour-react

v0.2.4

Published

React wrapper components for Tourbuilder

Downloads

96

Readme

@multimediafabrik/tour-react

A robust React component for embedding Pano2VR virtual tours, built on top of the @multimediafabrik/tour library.

This component is designed for seamless integration into modern React applications and automatically handles common issues like WebGL memory leaks by running the tour inside a sandboxed <iframe>.

Features

  • Easy Integration: Drop the <Panorama> component into your React app to get started.
  • Memory Leak Prevention: Automatically isolates the Pano2VR player in a sandboxed environment to ensure WebGL contexts are properly cleaned up.
  • Custom Loading Elements: Pass any React component as children to serve as a custom loading indicator or cover element while the tour initializes.
  • Responsive: Designed to be fully responsive and will fill its parent container by default.
  • Interactive: Control the starting position and receive updates on position changes through a simple props-based API.

Installation

To install the package and its peer dependencies, run the following command in your project's terminal:

npm install @multimediafabrik/tour-react

Basic Usage

Import the Panorama component and provide it with the required basepath. You can also pass a custom component as children to act as a loading screen.

import Panorama from '@multimediafabrik/tour-react';
import type { PanoPosition, TransitionSettings } from '@multimediafabrik/tour-react';

// A custom loading component
const TourLoader = () => (
<div style={{
width: '100%',
height: '100%',
display: 'flex',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#222',
color: 'white',
fontFamily: 'sans-serif',
}}>
<h2>Loading Virtual Tour...</h2>
</div>
);

function App() {
const tourDataPath = "https://your-server.com/path/to/tour/data/";

const handlePositionChange = (position: PanoPosition) => {
console.log('Debounced position changed:', position);
};

const transition: TransitionSettings = {
type: 'crossdissolve',
before: 2, // zoomin
after: 3, // zoomout
transitiontime: 1.5,
};

return (
<div style={{ width: '100vw', height: '100vh' }}>
<Panorama
basepath={tourDataPath}
node={1}
fov={80}
onPositionChange={handlePositionChange}
transition={transition}
>
<TourLoader />
</Panorama>
</div>
);
}

export default App;

Props API

The <Panorama> component accepts the following props:

| Prop | Type | Required | Description | | :---- | :---- | :---- | :---- | | basepath | string | Yes | The base URL path to the directory containing your tour's pano.xml. The component is recreated when this changes. | | children | React.ReactNode | No | A React child component to render inside the tour container. Ideal for a loading indicator, as it's replaced once the tour initializes. | | node | number | No | The starting node ID for the panorama. | | fov | number | No | The initial field of view (zoom level). Defaults to 70. | | pan | number | No | The initial horizontal pan angle. Defaults to 0. | | tilt | number | No | The initial vertical tilt angle. Defaults to 0. | | singleImage | boolean | No | If true, hides the skin and UI elements of the Pano2VR player. Defaults to false. | | transition | TransitionSettings | No | An object to configure the transition effects between nodes. See TransitionSettings type below for details. | | onPositionChange | (position: PanoPosition) => void | No | A debounced callback that fires after the user stops changing the view. It receives a PanoPosition object. |

PanoPosition Type

The onPositionChange callback receives an object with the following structure:

type PanoPosition = {
basepath: string;
node: number;
fov: number;
pan: number;
tilt: number;
};

TransitionSettings Type

The transition prop accepts an object with the following structure to customize the effects when changing nodes.

type TransitionSettings = {
type: 'cut' | 'crossdissolve' | 'diptocolor' | 'irisround' | 'irisrectangular' | 'wipeleftright' | 'wiperightleft' | 'wipetopbottom' | 'wipebottomtop' | 'wiperandom';
before?: 0 | 2; // 0 for none, 2 for zoomin
after?: 0 | 2 | 3 | 4; // 0 for none, 2 for zoomin, 3 for zoomout, 4 for flyin
transitiontime?: number;
waitfortransition?: boolean;
zoomedfov?: number;
zoomspeed?: number;
dipcolor?: string; // e.g., '0xff0000' for red
softedge?: number;
};

TransitionSettings Properties:

| Property | Type | Description | | :---- | :---- | :---- | | type | string | The main transition effect type. | | before | number | The effect to apply before the main transition starts (0: none, 2: zoom in). | | after | number | The effect to apply after the main transition ends (0: none, 2: zoom in, 3: zoom out, 4: fly in). | | transitiontime | number | The duration of the main transition in seconds. | | waitfortransition | boolean | If true, the after effect will wait for the main transition to finish completely. | | zoomedfov | number | The field of view to zoom to when a zoomin effect is selected. | | zoomspeed | number | The speed of the zoom effect. | | dipcolor | string | The hexadecimal color (e.g., '0x000000') to use when type is set to diptocolor. | | softedge | number | The size of the soft edge for iris and wipe transitions. |

License

This project is licensed under the Apache-2.0 License.