Skip to main content

AnimationManager

Trait AnimationManager 

Source
pub trait AnimationManager<T: Animatable + Send + 'static>: Clone + Copy {
    // Required methods
    fn new(initial: T) -> Self;
    fn animate_to(&mut self, target: T, config: AnimationConfig);
    fn animate_sequence(&mut self, sequence: AnimationSequence<T>);
    fn animate_keyframes(&mut self, animation: KeyframeAnimation<T>);
    fn update(&mut self, dt: f32) -> bool;
    fn get_value(&self) -> T;
    fn is_running(&self) -> bool;
    fn reset(&mut self);
    fn stop(&mut self);
    fn delay(&mut self, duration: Duration);
}

Required Methods§

Source

fn new(initial: T) -> Self

Source

fn animate_to(&mut self, target: T, config: AnimationConfig)

Source

fn animate_sequence(&mut self, sequence: AnimationSequence<T>)

Source

fn animate_keyframes(&mut self, animation: KeyframeAnimation<T>)

Source

fn update(&mut self, dt: f32) -> bool

Source

fn get_value(&self) -> T

Source

fn is_running(&self) -> bool

Source

fn reset(&mut self)

Source

fn stop(&mut self)

Source

fn delay(&mut self, duration: Duration)

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: Animatable + Send + 'static> AnimationManager<T> for MotionHandle<T>