Skip to main content

sample_effect_param

Function sample_effect_param 

Source
pub fn sample_effect_param(
    animation: &Animated<EffectValue>,
    time: MediaTime,
) -> EffectParamValue
Expand description

Samples one effect parameter with the project’s keyframe semantics.

Float and Vec2 interpolate component-wise. A Color (straight, sRGB-encoded) interpolates premultiplied, as CSS colors do, so a fade from transparent to red does not pass through a dark fringe; it is clamped to 0..=1 after an overshooting curve. Enum and Bool keyframes hold (validation rejects any other interpolation for them).