FreeCameraController

View source

Shared input and lifecycle support for camera controllers.

Subclasses can consume mouseDelta, keys, and touchPointers from their update method. Pointer input is captured by the target element so dragging continues to work when the pointer leaves the element.

Constructor


constructor ( camera: Camera , targetElement?: EventTarget , keyboardTarget?: EventTarget )

View source

Parameters

Name Description Default
camera — —
targetElement? — —
keyboardTarget? — ...

Properties


Methods


syncFromCamera ( ) : FreeCameraController

View source

Synchronizes yaw and pitch with the camera’s current orientation.

This is useful when another system changes the camera orientation before handing control to this controller.

update ( deltaTime: number ) : void

View source

Parameters

Name Description Default
deltaTime — ...

onTouchMove ( event: PointerEvent , previousX: number , previousY: number ) : void

View source

Parameters

Name Description Default
event — —
previousX — —
previousY — —

updateMovement ( deltaTime: number ) : void

View source

Parameters

Name Description Default
deltaTime — —