1681-engine / index / requestPointerLock
Function: requestPointerLock() ​
ts
function requestPointerLock(
element,
options?,
doc?
): Promise<boolean>;Defined in: src/platform/pointerLock.ts:33
Asks to lock the pointer to element (the game canvas); resolves whether it holds afterwards. raw asks for unaccelerated movement where the browser offers it, and falls back to the plain lock where it refuses that option.
Parameters ​
| Parameter | Type |
|---|---|
element | Element |
options | { raw?: boolean; } |
options.raw? | boolean |
doc | PointerLockDocument | null |
Returns ​
Promise<boolean>