usePointerLock ​
that provides reactive pointer lock
typescript
import { usePointerLock } from '@siberiacancode/reactuse';
Usage ​
typescript
const { supported, lock, unlock, element } = usePointerLock();
Demo ​
Api ​
Parameters
Name | Type | Default | Note |
---|---|---|---|
target | UsePointerLockTarget | - | The target element for the pointer lock |