Skip to main content

samples_to_track

Function samples_to_track 

Source
pub fn samples_to_track(
    samples: &[(Duration, f32, f32)],
    project_fps: u32,
) -> Vec<CursorSample>
Expand description

Resample timestamped cursor samples ((elapsed_since_start, x, y), sorted by time) onto the project frame grid: each sample’s frame is floor(elapsed_secs · project_fps), and the latest sample at a frame wins (one [CursorSample] per frame). Pure.