Skip to main content

Class: PointerLockControls2

Extra-Helpers.PointerLockControls2

Hierarchy

Implements

Methods

addEventListener

addEventListener(type, listener): void

Adds a listener to an event type.

Parameters

NameType
typeTPointerLockEvents
listener(event: IEvent<TPointerLockEvents>) => void

Returns

void

Implementation of

ICameraControls.addEventListener

Inherited from

SimpleEventDispatcher.addEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:48


hasEventListener

hasEventListener(type, listener): boolean

Checks if listener is added to an event type.

Parameters

NameType
typeTPointerLockEvents
listener(event: IEvent<TPointerLockEvents>) => void

Returns

boolean

Implementation of

ICameraControls.hasEventListener

Inherited from

SimpleEventDispatcher.hasEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:56


removeEventListener

removeEventListener(type, listener): void

Removes a listener from an event type.

Parameters

NameType
typeTPointerLockEvents
listener(event: IEvent<TPointerLockEvents>) => void

Returns

void

Implementation of

ICameraControls.removeEventListener

Inherited from

SimpleEventDispatcher.removeEventListener

Defined in

webgi/src/helpers/EventDispatcher.ts:63


dispatchEvent

dispatchEvent(event): void

Fire an event type.

Parameters

NameType
eventIEvent<TPointerLockEvents>

Returns

void

Implementation of

ICameraControls.dispatchEvent

Inherited from

SimpleEventDispatcher.dispatchEvent

Defined in

webgi/src/helpers/EventDispatcher.ts:74


onElementClick

onElementClick(event): void

Parameters

NameType
eventEvent

Returns

void

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:55


onMouseMove

onMouseMove(event): void

Parameters

NameType
eventMouseEvent

Returns

void

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:68


onPointerlockChange

onPointerlockChange(): void

Returns

void

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:77


onPointerlockError

onPointerlockError(): void

Returns

void

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:95


connect

connect(): void

Returns

void

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:101


disconnect

disconnect(): void

Returns

void

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:110


dispose

dispose(): void

Returns

void

Implementation of

ICameraControls.dispose

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:119


getDirection

getDirection(v): Vector3

Parameters

NameType
vVector3

Returns

Vector3

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:133


moveForward

moveForward(distance): void

Parameters

NameType
distancenumber

Returns

void

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:139


moveRight

moveRight(distance): void

Parameters

NameType
distancenumber

Returns

void

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:152


lock

lock(): void

Returns

void

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:160


unlock

unlock(): void

Returns

void

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:166


update

update(): void

Returns

void

Implementation of

ICameraControls.update

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:172

Properties

domElement

Readonly domElement: HTMLElement

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:25


object

Readonly object: Object3D<Event>

Implementation of

ICameraControls.object

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:26


isLocked

isLocked: boolean = false

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:27


enabled

enabled: boolean = true

Implementation of

ICameraControls.enabled

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:29


minPolarAngle

minPolarAngle: number = 0

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:33


maxPolarAngle

maxPolarAngle: number = Math.PI

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:34


pointerSpeed

pointerSpeed: number = 1.0

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:36


autoLockOnClick

autoLockOnClick: boolean = true

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:38

Constructors

constructor

new PointerLockControls2(camera, domElement)

Parameters

NameType
cameraObject3D<Event>
domElementHTMLElement

Overrides

SimpleEventDispatcher.constructor

Defined in

webgi/src/helpers/threejs/PointerLockControls2.ts:40