Creates a pointer tracker with a timeout that determines when the mouse should stop contributing wind because it has gone still or left the canvas.
Records a freshly projected pointer location in world space.
The timestamp provided by the browser.
The pointer position projected onto the ground.
Clears all recent samples. This is used when the pointer leaves the canvas or when the application loses focus and should stop generating wind.
Produces the smoothed state that the simulation consumes each frame.
The current frame timestamp.
A stable wind source description.
PointerWindTracker converts a stream of mouse positions into a stable wind source description. The class deliberately averages multiple samples instead of trusting just the latest one because raw mouse data can be noisy and visually unpleasant when converted directly into physics forces.