Class: StereoPlugin

PSV.plugins.StereoPlugin

new PSV.plugins.StereoPlugin (psv)

Adds stereo view on mobile devices

Name Type Description
psv PSV.Viewer

Extends

Members

PSV.plugins.StereoPlugin.EVENTS string staticconstant

Available events

id string readonly inherited overrides

Unique identifier of the plugin

prop Object protected

Properties:
Name Type Description
isSupported Promise.<boolean>

indicates of the gyroscope API is available

renderer external:THREE.WebGLRenderer

original renderer

noSleep external:NoSleep
wakeLock WakeLockSentinel

Reference to main controller

Methods

destroy () package overrides

init () package overrides

isEnabled ()boolean

Checks if the stereo view is enabled

Returns:
Type Description
boolean

start ()Promise

Enables the stereo view

  • enables NoSleep.js
  • enables full screen
  • starts gyroscope controle
  • hides markers, navbar and panel
  • instanciate external:THREE.StereoEffect
Fires:
Throws:

if the gyroscope API is not available/granted

Type
PSV.PSVError
Returns:
Type Description
Promise

stop ()

Disables the stereo view

Fires:

toggle ()

Enables or disables the stereo view

Events

PSV.plugins.StereoPlugin.event:stereo-updated

Triggered when the stereo view is enabled/disabled

Name Type Description
enabled boolean