Expand description
Animation curves.
Every axis of every icon animation is driven by a value in [0, 1]
produced by an AnimationCurve. The engine linearly maps this value
from the origin to the target coordinate, so overshoot curves (values
outside [0, 1]) are permitted.
Two concrete implementations share the trait:
BuiltinEasing— closed-form easings (Linear,EaseInOut,SineOut,CubicBezier { .. }, …).KeyframeCurve— a sorted list of(t, v)pairs plus aKeyframeInterpmode.
Keyframe curves can also be built by sampling a user-supplied
function at spec-build time via KeyframeCurve::from_curve_fn or
KeyframeCurve::from_motion_fn. The callable is invoked only during
construction; the resulting curve is pure data and the tick loop never
calls back into user code.
Structs§
- Keyframe
- One entry in a
KeyframeCurve. - Keyframe
Curve - A sorted, validated list of
(t, v)pairs plus an interpolation mode. - Motion
Context - Movement metadata handed to motion-aware curve samplers.
Enums§
- Builtin
Easing - Closed-form easing functions.
- Curve
- The public curve type used inside every
crate::IconAnimationSpec. - Keyframe
Interp - How adjacent keyframes are interpolated.
Constants§
- MAX_
SAMPLES - Maximum permissible sample count for a function-generated curve.
- MIN_
SAMPLES - Minimum permissible sample count for a function-generated curve.
- VALUE_
CLAMP - Absolute clamp applied to every sampled value in
KeyframeCurve::from_curve_fn/KeyframeCurve::from_motion_fn.
Traits§
- Animation
Curve - Trait implemented by every curve variant.