HMDCameraComponent

HMDCameraComponent

Holds Left/Right eye VR camera.

Constructor

new HMDCameraComponent(leftEyeCamera, rightEyeCamera)

Parameters:
Name Type Description
leftEyeCamera WebVRCamera

VRCamera

rightEyeCamera WebVRCamera

VRCamera

Methods

_updateCamera()

Update HMDCamera transformation based on the passed in transform

applyOnEntity(leftEyeCamera, rightEyeCamera, entity) → {boolean}

Apply leftEyeCamera and rightEyeCamera camera to the passed in entity

Parameters:
Name Type Description
leftEyeCamera WebVRCamera
rightEyeCamera WebVRCamera
entity Entity

clone() → {HMDCameraComponent}

Clone the HMDCameraComponent

copy(source) → {HMDCameraComponent}

copy the source VRCameraComponent to this

Parameters:
Name Type Description
source HMDCameraComponent

resetData()

Reset data if this HMDCamera is not under any cameraRig

updateData(display)

Update HMDCameraComponent data based on passed in display:

  • if display == null, reset all the data in this component
  • else, load data from passed in display
Parameters:
Name Type Description
display display

VRDisplay