You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The component uses _usePointerLock_ hook to acquire pointer lock. Clicking on canvas area and moving mouse you will directly control the ball inside the canvas. Pressing escape you return to expected state.
> The component uses _usePointerLock_ hook to acquire pointer lock. Clicking on canvas area and moving mouse you will directly control the ball inside the canvas. Pressing escape you return to expected state.
Disables OS-level adjustment for mouse acceleration, and accesses raw mouse input instead. The default value is false; setting it to true will disable mouse acceleration.
80
+
> - __param.onError__: _(e: unknown)=>void_
81
+
function that will be executed when an error throwing during request.
* **`usePointerLock`**: Hook to use [PointerLock API](https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API).
6
+
* @param {UsePointerLockProps} param - object
7
+
* @param {RefObject<T>|T} param.target - element that requires lock.
8
+
* @param {boolean} [param.unadjustedMovement] - Disables OS-level adjustment for mouse acceleration, and accesses raw mouse input instead. The default value is false; setting it to true will disable mouse acceleration.
9
+
* @param {(e: unknown)=>void} param.onError - function that will be executed when an error throwing during request.
10
+
* @param {(target: RefObject<T>|T) => void} [param.onLock] - function that will be executed when lock has been acquired.
11
+
* @param {() => void} [param.onUnlock] - function that will be executed when lock has been released.
0 commit comments