Skip to main content

apply_motion_paths

Function apply_motion_paths 

Source
pub fn apply_motion_paths(
    props: &mut AnimatedProperties,
    paths: &[MotionPathConfig],
    time: f64,
)
Expand description

Apply every motion_path effect additively to props.translate_x/ translate_y (and, when orient is set, props.rotation) — the same treatment apply_orbits/apply_wiggles already give their own continuous effects, and critically, fields css::animation:: apply_animated_props already bridges into css.transform’s translate/rotate functions. That bridge — not a new one — is what makes a motion_path excursion past the viewport visible to --strict-anim (rustmotion::cli::commands::geometry:: apply_static_node_transform, which folds css.transform to detect overflow): this function must never write position/orientation anywhere else, or that detection silently stops seeing it.