# StereoPlugin
Adds stereo view on mobile devices. Requires the Gyroscope plugin.
This plugin is available in the @photo-sphere-viewer/stereo-plugin (opens new window) package.
# Usage
Once enabled the plugin will add a new "Stereo view" button only shown when the gyroscope API is available. It uses the WakeLock API to prevent the display from dimming or shuting down.
const viewer = new PhotoSphereViewer.Viewer({
plugins: [
PhotoSphereViewer.GyroscopePlugin,
PhotoSphereViewer.StereoPlugin,
],
});
# Configuration
# lang
- type:
object
- default:
lang: {
stereo: 'Stereo view',
stereoNotification: 'Click anywhere to exit stereo view.',
pleaseRotate: 'Please rotate your device',
tapToContinue: '(or tap to continue)',
}
Note: this option is not part of the plugin but is merged with the main lang
object.
# Buttons
This plugin adds buttons to the default navbar:
stereo
allows to start the stereo view
If you use a custom navbar you will need to manually add the buttons to the list.