Expand description
eazy-keyframes — Keyframe-based animation system.
Provides keyframe tracks for defining complex animations with values at specific time points and per-segment easing.
§Examples
§Using the builder API
use eazy_keyframes::{KeyframeTrack, Keyframe};
use eazy_core::Easing;
let track = KeyframeTrack::new()
.keyframe(0.0, [0.0_f32, 0.0, 0.0])
.keyframe_eased(0.5, [100.0, 50.0, 0.0], Easing::OutElastic)
.keyframe(1.0, [0.0, 100.0, 0.0]);
// Sample at 75% through the animation
let position = track.sample(0.75);§Using the keyframes! macro
use eazy_keyframes::{keyframes, Easing};
let track = keyframes![
(0.0, 0.0_f32), // (time, value) - linear
(0.5, 100.0, Easing::OutBounce), // (time, value, easing)
(1.0, 50.0)
];
let value = track.sample(0.75);Re-exports§
pub use keyframe::Keyframe;pub use keyframe::keyframe;pub use keyframe::keyframe_eased;pub use track::KeyframeTrack;
Modules§
- keyframe
- Keyframe definition for animation tracks.
- track
- Keyframe track for sampling interpolated values over time.
Macros§
- keyframes
- Create a
KeyframeTrackfrom a list of keyframe tuples.
Enums§
Traits§
- Tweenable
- A value that can be interpolated between two points.