Skip to main content

Module animation

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 -> to over duration using curve, driven entirely off a wall-clock Instant. No per-frame state — just query current(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..1 duration ratio to produce an interpolation factor (which may itself over/undershoot for Spring).

Traits§

Lerp

Functions§

ease_out
Delegates to Curve::EaseOut so there is exactly one home for the formula — retune it there and every fade/slide/spawn/snap follows.