paint-brush
Pointer Lock API: How to Control Mouse Cursorby@mozilla
1,527 reads
1,527 reads

Pointer Lock API: How to Control Mouse Cursor

by Mozilla Contributors7mJune 8th, 2020
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

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 Contributors

Mozilla Contributors

@mozilla

Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape.

About @mozilla
LEARN MORE ABOUT @MOZILLA'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Mozilla Contributors HackerNoon profile picture
Mozilla Contributors@mozilla
Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape.

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite
Learnrepo