Expand description
MotionScheme::neutral: the design-language-free motion scheme — six
spring presets plus a duration/easing token vocabulary, replacing a plain
duration+easing-only model.
This crate constructs no other MotionScheme — a design system builds
its own from its own plugin crate (frust-material’s tokens module
carries the M3 Expressive six-spring mapping, source cited there;
frust-cupertino’s carries the community-documented iOS spring
baseline). Unlike crate::shape/crate::elevation/crate::typography,
MotionScheme::neutral’s springs are not a reused M3 table — every
spring here is critically damped (no bounce), a deliberately unbranded
feel distinct from either design system’s springier presets (see that
constructor’s own doc comment).
MotionSpring is plain data defined here rather than reusing
frust-core’s animation-core spring type: frust-theme already
depends on frust-core (see docs/ARCHITECTURE.md), so
impl From<MotionSpring> for SpringDesc
below lives right here rather than in a separate facade conversion.
Structs§
- Cosmetic
Loop Rate - The
CosmeticLooptick-rate cap (Hz) — an app-tunable pacing token consumed by the frame gate’s pacing: a purely cosmetic, indefinitely-looping animation (a shimmer/pulse with no user-visible endpoint) is capped to this rate rather than repainting every display frame. Uncapped (0/None) is not an allowed value — a cosmetic loop always paces to some ceiling, so this type clamps any constructed value up toCosmeticLoopRate::FLOOR_HZ(10Hz), a sane floor below which a “cosmetic” loop reads as visibly stuttering rather than paced. - Easing
Set - The three-easing vocabulary Glyph’s bezier-authored motion patterns are
built from:
spatial(position/size changes — may overshoot),effects(opacity/color changes — never overshoots), andexit(elements leaving the screen — accelerates out). SeeMotionScheme::neutralfor this crate’s own curve values, andfrust-material/frust-cupertino’s owntokensmodules for their per-baseline curve values and sources. - Motion
Durations - Named duration tokens, in milliseconds.
- Motion
Scheme - Six motion spring presets, plus the Glyph duration/easing token vocabulary mapped onto each baseline.
- Motion
Spring - A physics spring’s damping ratio and stiffness (mass is implicitly
1.0for every preset; see module docs).