Cranpose Animation
A physics-based animation library designed for the Cranpose composition model.
When to Use
Use this crate to create smooth, interruptible animations. Unlike traditional timeline-based animation systems, Cranpose animations are driven by state changes. When a target value changes, the animation system automatically calculates the transition from the current value to the new target, maintaining velocity and continuity.
Key Concepts
Animatable<T, V>: A low-level value holder that tracks the current value and velocity. It is the primitive used to build higher-level animation APIs.AnimationSpec: Defines the behavior of an animation. Common types include:Spring: Physical simulation based on stiffness and damping ratio.Tween: Duration-based interpolation with an easing curve.
animate*AsState: Composable functions that subscribe to a target value and return aStateobject representing the current animated value.
Example: Interruptible Spring Animation
use *;
Example: Infinite Transition
use ;
use *;