Pointer Lock API: How to Control Mouse Cursor

Written by mozilla | Published 2020/06/08
Tech Story Tags: mozilla | web-development | website-development | beginners | frontend | mdn-documentation | coding | javascript

TLDR 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.via the TL;DR App

no story

Written by mozilla | Mozilla (stylized as moz://a) is a free software community founded in 1998 by members of Netscape.
Published by HackerNoon on 2020/06/08