Skip to main content

Class: DesktopControls

Defined in: xrblocks-uiextensions/src/desktop-controls.ts:63

Constructors​

Constructor​

new DesktopControls(camera: PerspectiveCamera, options: DesktopControlsOptions): DesktopControls;

Defined in: xrblocks-uiextensions/src/desktop-controls.ts:88

Parameters​

ParameterType
cameraPerspectiveCamera
optionsDesktopControlsOptions

Returns​

DesktopControls

Properties​

PropertyModifierTypeDefault valueDescriptionDefined in
optionsreadonlyLocomotionOptionsundefined-xrblocks-uiextensions/src/desktop-controls.ts:65
pitchpublicnumber0Look-up/down in radians, clamped to just under ±90°.xrblocks-uiextensions/src/desktop-controls.ts:69
statereadonlyLocomotionStateundefined-xrblocks-uiextensions/src/desktop-controls.ts:64
yawpublicnumberundefinedHeading in radians, about +Y.xrblocks-uiextensions/src/desktop-controls.ts:67

Methods​

dispose()​

dispose(): void;

Defined in: xrblocks-uiextensions/src/desktop-controls.ts:176

Returns​

void


update()​

update(delta: number): void;

Defined in: xrblocks-uiextensions/src/desktop-controls.ts:166

Advance movement and write the pose onto the camera.

Parameters​

ParameterType
deltanumber

Returns​

void