Image for Pointer Lock API

Pointer Lock API

The Pointer Lock API allows websites to hide the mouse cursor and capture all its movements, even beyond the screen edges. This is useful for immersive experiences like 3D games or modeling tools, where continuous control is needed without the cursor leaving the window. When active, moving the mouse doesn't move the cursor but provides relative movement data, enabling smooth and unrestricted control of the virtual environment. It is initiated by user interaction and ensures a secure, user-consented way to enhance interactive web applications.