rustmotion-core 0.6.0

Core types, traits, and rendering utilities for rustmotion
1
2
3
4
5
6
7
8
9
10
11
12
use crate::schema::{AnimationEffect, TimelineStep};

/// Trait for components that support animation.
pub trait Animatable {
    fn animation_effects(&self) -> &[AnimationEffect];

    /// Timed animation steps (`timeline` field): each step's animations are
    /// resolved with `delay += step.at`. Empty by default.
    fn timeline_steps(&self) -> &[TimelineStep] {
        &[]
    }
}