Skip to main content

trail_opacity

Function trail_opacity 

Source
pub fn trail_opacity(
    point_time_ms: u64,
    current_time_ms: u64,
    fade_duration_ms: u64,
) -> f32
Expand description

Returns the opacity [0.0, 1.0] for a trail point at a given playback position. The point is fully opaque at point_time_ms and fades to 0.0 after fade_duration_ms. Returns 0.0 if the point has not yet been reached or has fully faded.