Skip to content

usePointerLock ​

Category
Sensors

that provides reactive pointer lock

typescript
import { usePointerLock } from '@siberiacancode/reactuse';

Usage ​

typescript
const { supported, lock, unlock, element } = usePointerLock();

Demo ​

Api ​

Parameters

NameTypeDefaultNote
targetUsePointerLockTarget-The target element for the pointer lock

Contributors ​

Source • Demo