pub trait PropertyInstance<T: Default + Clone> {
    // Required methods
    fn get(&self) -> &T;
    fn _get_vtable_id(&self) -> Option<usize>;
    fn get_mut(&mut self) -> &mut T;
    fn set(&mut self, value: T);
    fn _get_transition_manager(&mut self) -> Option<&mut TransitionManager<T>>;
    fn ease_to(
        &mut self,
        new_value: T,
        duration_frames: u64,
        curve: EasingCurve
    );
    fn ease_to_later(
        &mut self,
        new_value: T,
        duration_frames: u64,
        curve: EasingCurve
    );
}
Expand description

An abstract Property that may be either: Literal, a dynamic runtime Expression, or a Timeline-bound value

Required Methods§

source

fn get(&self) -> &T

source

fn _get_vtable_id(&self) -> Option<usize>

source

fn get_mut(&mut self) -> &mut T

source

fn set(&mut self, value: T)

source

fn _get_transition_manager(&mut self) -> Option<&mut TransitionManager<T>>

Used by engine to gain access to this property’s transition queue

source

fn ease_to(&mut self, new_value: T, duration_frames: u64, curve: EasingCurve)

Immediately start transitioning from current value to the provided new_value, clearing the transition queue before doing so

source

fn ease_to_later( &mut self, new_value: T, duration_frames: u64, curve: EasingCurve )

Add a transition to the transition queue, which will execute after the current queue is complete. The starting value for this new transition will be the final value upon completion of the current transition queue.

Trait Implementations§

source§

impl<T: Default + Clone + 'static> Clone for Box<dyn PropertyInstance<T>>

source§

fn clone(&self) -> Self

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<T: Default + Clone + 'static> Default for Box<dyn PropertyInstance<T>>

source§

fn default() -> Box<dyn PropertyInstance<T>>

Returns the “default value” for a type. Read more

Implementors§