Pointer Lock API: How to Control Mouse Cursorby@mozilla
827 reads

Pointer Lock API: How to Control Mouse Cursor

June 8th 2020
7 min
by @mozilla 827 reads
tldt arrow
Read on Terminal Reader🖨️

Too Long; Didn't Read

The Pointer Lock API provides input methods based on the movement of the mouse over time (i.e., deltas), not just the absolute position of the cursor in the viewport. It gives you access to raw mouse movement, locks the target of mouse events to a single element, eliminates limits on how far mouse movement can go in a single direction, and removes the cursor from view. It is ideal for first person 3D games, for example. The API is useful for applications that require significant mouse input to control movements.

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - Pointer Lock API: How to Control Mouse Cursor
Mozilla Contributors HackerNoon profile picture

@mozilla

Mozilla Contributors

About @mozilla
LEARN MORE ABOUT @MOZILLA'S EXPERTISE AND PLACE ON THE INTERNET.
react to story with heart
Mozilla Contributors HackerNoon profile picture
by Mozilla Contributors @mozilla.Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape.
Read My Stories

RELATED STORIES

L O A D I N G
. . . comments & more!
Hackernoon hq - po box 2206, edwards, colorado 81632, usa