macro_rules! keyframes {
() => { ... };
($($kf:expr),+ $(,)?) => { ... };
}Expand description
Create a KeyframeTrack from a list of keyframe tuples.
Supports two tuple formats:
(time, value)— keyframe with linear easing(time, value, easing)— keyframe with custom easing
§Examples
use eazy_keyframes::{keyframes, Easing};
// Simple f32 animation
let track = keyframes![
(0.0, 0.0_f32),
(0.5, 100.0, Easing::OutBounce),
(1.0, 50.0)
];
// Array animation (e.g., position)
let track = keyframes![
(0.0, [0.0_f32, 0.0]),
(0.5, [100.0, 50.0], Easing::OutElastic),
(1.0, [0.0, 100.0])
];