Expand description
§animato-tween
Tween<T> — single-value animation from a start to an end value over time.
This crate is fully no_std-compatible and requires no heap allocation.
§Quick Start
use animato_tween::{Tween, Loop};
use animato_core::{Easing, Update};
let mut tween = Tween::new(0.0_f32, 100.0)
.duration(1.0)
.easing(Easing::EaseOutCubic)
.build();
// Advance by 0.5 seconds (half the duration):
tween.update(0.5);
assert!(tween.value() > 50.0); // EaseOut front-loads motion
assert!(!tween.is_complete());
tween.update(0.5);
assert!(tween.is_complete());
assert_eq!(tween.value(), 100.0);§Feature Flags
| Feature | Effect |
|---|---|
std | Enables std-dependent features (forwarded to animato-core) |
serde | Derives Serialize/Deserialize on public types |
Re-exports§
pub use builder::TweenBuilder;pub use loop_mode::Loop;pub use modifiers::round_to;pub use modifiers::snap_to;pub use stagger_pattern::GridOrigin;pub use stagger_pattern::StaggerPattern;pub use tween::Tween;pub use tween::TweenSnapshot;pub use tween::TweenState;pub use waveform::Waveform;
Modules§
- builder
- Builder for
Tween<T>. - loop_
mode - Loop mode for
Tween. - modifiers
- Value modifier free functions for post-processing tween output.
- stagger_
pattern - Advanced stagger delay patterns.
- tween
- Core
Tween<T>type andTweenStateenum. - waveform
- Procedural waveform generators for animation values.