Skip to main content

retarget

Function retarget 

Source
pub fn retarget<T: Lerp + Send + Sync + 'static>(
    current: T,
    to: T,
    spec: &TransitionSpec,
) -> Option<Transition<T>>
Expand description

CSS-retarget rule: when a transition re-triggers mid-flight, the new tween starts from the CURRENT interpolated value (the live component value the previous driver tick wrote), never the old endpoint. This helper builds that tween; equal endpoints return None (equal-value writes are no-ops, no zombie transitions).