CLASSES
TagsA - Z

WebVRFreeCamera

NodeCameraTargetCameraFreeCamera

Description

class WebVRFreeCamera extends FreeCamera

Constructor

new WebVRFreeCamera(name, position, scene, webVROptions)

Parameters

Name Type Description
name string
position Vector3
scene Scene

Members

rawPose : DevicePose

devicePosition : Vector3

deviceRotationQuaternion : any

deviceScaleFactor : number

controllers : Array<WebVRController>

nonVRControllers : Array<Gamepad>

rigParenting : boolean

onControllersAttached : Array<WebVRController>) => void

onNonVRControllerAttached : Gamepad) => void

leftController : WebVRController

rightController : WebVRController

Methods

getControllerByName(name) WebVRController

Parameters

Name Type Description
name string

getForwardRay(length) Ray

Parameters

Name Type Description
optional length number

updateFromDevice(poseData) void

Parameters

Name Type Description
poseData DevicePose

attachControl(element, noPreventDefault) void

WebVR's attach control will start broadcasting frames to the device.

Note that in certain browsers (chrome for example) this function must be called

within a user-interaction callback. Example:

 scene.onPointerDown = function() { camera.attachControl(canvas); }
     * @param {HTMLElement} element

     * @memberOf [WebVRFreeCamera](/classes/3.0/WebVRFreeCamera)

Parameters

Name Type Description
element HTMLElement
optional noPreventDefault boolean

detachControl(element) void

Parameters

Name Type Description
element HTMLElement

getClassName() string

resetToCurrentRotation() void

initControllers() void