Skip to main content

rustmotion_core/traits/
animatable.rs

1use crate::schema::{AnimationEffect, TimelineStep};
2
3/// Trait for components that support animation.
4pub trait Animatable {
5    fn animation_effects(&self) -> &[AnimationEffect];
6
7    /// Timed animation steps (`timeline` field): each step's animations are
8    /// resolved with `delay += step.at`. Empty by default.
9    fn timeline_steps(&self) -> &[TimelineStep] {
10        &[]
11    }
12}