v144 · user input

Pointer Lock on Android

Provides access to raw mouse movement by locking the target of mouse events to a single element and hiding the mouse cursor.

concepts

  1. Pointer Lock on Android

    Pointer Lock now works on Android with attached pointing devices. Web games and 3D viewers can capture relative pointer motion the same way they do on desktop.

  2. Orbit Controls

    Tap the arena to lock the pointer, drag indefinitely to orbit a 3D cube — the motivating 3D-viewer / game scenario the Android port was driven by.

  3. FPS Camera

    The other canonical workload: a first-person shooter camera with mouse-look, sensitivity slider, target practice, and hit-rate tracking.

  4. Gesture Recorder

    Record raw movementX/Y data from a locked pointer and replay it as an animated gesture trail. Computes total distance, duration, average speed, and peak speed — the motion-analysis workload that pointer lock on Android unlocks.

why it shipped

The Pointer Lock API provides applications the ability to directly interpret mouse movements as an input method, rather than being limited to only reading the position of the mouse cursor.

references