contro-max
Version:
Game controls done in the best possible way!
17 lines (16 loc) • 565 B
TypeScript
interface LockPointerOptions {
/**
* The most probably you don't need to override it
* @default document.documentElement */
target?: HTMLElement;
}
type LockPointerReturnType = Promise<{
/** Whether pointer lock bypasses system acceleration and sens */
usingRawInput: boolean;
} | null>;
/**
* Browser rejects pointer lock if it wan't requested by the user itself (user gesture)
* @returns Returns null if not supported
*/
export declare const requestPointerLock: ({ target }?: LockPointerOptions) => LockPointerReturnType;
export {};