cranpose-animation
cranpose-animation provides spring, tween, decay, and state-driven transition
APIs for Cranpose. The crate owns animation math and frame callbacks; UI widgets
use the same types as app code.
Depend directly on cranpose-animation for animation primitives or custom
widgets. UI applications also use the cranpose facade
for composition and host setup. The feature set is empty.
Spring step
advance_spring computes one spring step from the current value, velocity,
target, damping ratio, stiffness, and elapsed seconds:
use ;
let = advance_spring;
assert!;
assert!;
Inside a composable, animateFloatAsState follows each new target and returns
a reactive State<f32>. updateTransition coordinates several values from one
state. Animatable<T> supports imperative targets and release velocity. Types
with one to four float dimensions can implement SpringScalar and Lerp.