Skip to main content

resolve_keyframe_track

Function resolve_keyframe_track 

Source
pub fn resolve_keyframe_track(anim: &Animation, time: f64) -> KeyframeValue
Expand description

Public wrapper around resolve_animation_value_full for callers outside this module that want to reuse the exact segment/easing/spring interpolation math (ordering, per-keyframe easing override, clamping at the ends) on a synthetic Animation they built themselves, without routing the result through AnimatedProperties/apply_property.

This is how box_builder.rs’s style.transition smoothing for border-radius/background is implemented: those two properties are paint-time CssStyle fields that every painter already reads directly (via paint_pass.rs, frozen) — there is no AnimatedProperties field for them to land in that anything downstream would ever look at, so resolving through the generic effects pipeline the way opacity/color do would be a dead end. Calling this directly and writing the resolved CssStyle field by hand instead reuses the proven interpolation math while staying entirely inside box_builder.rs’s own file scope.