usePointerLock ​
sensors
test coverage
Last changed: 28 days ago
TIP
This hook uses pointerLockElement browser api to provide enhanced functionality. Make sure to check for compatibility with different browsers when using this api
Hook that provides reactive pointer lock
typescript
import { usePointerLock } from '@siberiacancode/reactuse';
Usage ​
typescript
const { supported, lock, unlock, element } = usePointerLock();