17 Predicted Pointer Events. 17 of 95.
17/GESTURE PHYSICS/17 of 95
Predicted Pointer Events
The interface can draw where your pointer has not arrived yet.
Best experienced with a pointer.
The problem
Ink and cursors wait for the next hardware sample, so fast motion always feels a frame behind.
The solution
When supported, native predicted events extend the path; otherwise a labelled local velocity model estimates ahead.
Experiment
Play with the values
32ms
6
How it works
- Each real pointer sample is the ground truth for where the pointer has been.
- Velocity is estimated from recent samples.
- getPredictedEvents() extends the path when the browser provides it; otherwise a local velocity model estimates ahead and is labelled as such.
- The prediction is rendered beyond the last real point so ink feels immediate.
- The next real sample corrects the prediction instead of treating the guess as history.
Seen in
Drawing apps
Ink extends slightly ahead of the stylus so strokes feel immediate.
Stylus note apps
Predicted samples fill the gap between pen reports and display refresh.
Games
Aim reticles and trails anticipate motion to hide input latency.
Whiteboards
Freehand marks stay under the tip even when the OS delivers samples late.