WebVRCameraRigSystem

WebVRCameraRigSystem

VRCameraRigSystem used to process VR related data. Entry point for all the VR devices

Constructor

new WebVRCameraRigSystem(vrCanvasDom)

Parameters:
Name Type Description
vrCanvasDom dom

Dom used to render vr.

Methods

(static) canPresent() → {boolean}

Static function which used to identify if the window has any usable VR display

_getHeightFromDisplay()

Set tracker level to eye level by getting the height information from sittingToStanding transform
if there is no stageParameters for the vrDisplay using 1.5 to simulate the sitting to standing height

_setupDisplay()

Wraps windown.navigator.getVRDisplays and promise handling.

_setupVR()

Start chain of events to initialize WebVR display

hasExternalDisplay() → {boolean}

Identify if the currentDisplay has externalDsipaly.

setup(world)

Override function.
Called when the system is added to the world.
This method is called automatically when the system is added to a world.
By default it will go through all entities
accounted by the entity manager and try to add them to this system.

Parameters:
Name Type Description
world World

startVR()

Called to start presenting VR.

stopVR()

Called to stop presenting VR.

submitFrame()

Called after the scene is being rendered
only submit VR frame if this update pass was triggered by the VR
display's requestAnimationFrame and we are still presenting.