Skip to main content

cursor_is_static

Function cursor_is_static 

Source
pub fn cursor_is_static(track: &[CursorSample], frame: Frame, fps: u32) -> bool
Expand description

Whether the cursor is effectively stationary at project frame — the basis for CursorConfig::hide_static.

A pointer that hasn’t moved for a beat is visual noise the viewer’s eye has already filed away; cinematic recorders fade it out until it moves again. This returns true when the raw cursor has drifted less than ~0.4 % of the frame (Euclidean) over the trailing ~0.4 s window ending at frame — which includes the case where no new sample landed in the window at all. Returns false only for an empty track (there is no position to settle on). Pure arithmetic, so the hide-while-static behaviour is exhaustively testable without a renderer.