Provides additional features like sensitivity to pointer-lock.
import lock from 'pointer-lock-plus';
const pointer = lock({
element: canvas,
sensitivity: 0.0015,
onData(dx, dy) {
console.log(dx);
console.log(dy);
},
});npm install pointer-lock-plus
It has the same hooks as pointer-lock events, prefixed with on (onData, onClose, etc) and the the same callbacks are also available.
Contributions are welcome and suggestions on more stuff this library should offer.