Module animation
Expand description
Shared motion system. One curve set (Curve), one wall-clock driver
(Animated), one interruptible open/close driver (Transition), and
one stateful velocity-carrying Spring for interactive drag.
Fire-and-forget animations (fades, spawns, snaps) use Animated /
Transition — they are wall-clock parametric, so a dropped frame skips
rather than slows. Interactive gestures that need velocity continuity
across inputs (the workspace wheel) use Spring, fed the real frame dt.
Modules§
- animated
- Unified animation primitives. Replaces ad-hoc Instant-based fields
with a single
Animated<T: Lerp>driver consumable by widgets. - spring
Structs§
- Animated
- A driver that interpolates
from -> tooverdurationusingcurve, driven entirely off a wall-clockInstant. No per-frame state — just querycurrent(now)whenever you need the value. - Spring
- Transition
- An interruptible open/close transition tracking a
0.0..=1.0“openness” so a surface animates in and out, and a mid-flight reversal retargets from the current value instead of snapping to 0 first.
Enums§
- Curve
- Animation easing / dynamics curve. Applied to a normalized
0..1duration ratio to produce an interpolation factor (which may itself over/undershoot forSpring).
Traits§
Functions§
- ease_
out - Delegates to
Curve::EaseOutso there is exactly one home for the formula — retune it there and every fade/slide/spawn/snap follows.