Skip to content

1681-engine / index / onPointerLockChange

Function: onPointerLockChange() ​

ts
function onPointerLockChange(fn, doc?): () => void;

Defined in: src/platform/pointerLock.ts:55

Calls fn(locked) whenever the lock is taken or lost (Esc included). Returns the unsubscribe.

Parameters ​

ParameterType
fn(locked) => void
docPointerLockDocument | null

Returns ​

() => void

Released under the MIT License.