Trait pax_runtime_api::PropertyInstance
source · 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§
fn get(&self) -> &T
fn _get_vtable_id(&self) -> Option<usize>
fn get_mut(&mut self) -> &mut T
fn set(&mut self, value: T)
sourcefn _get_transition_manager(&mut self) -> Option<&mut TransitionManager<T>>
fn _get_transition_manager(&mut self) -> Option<&mut TransitionManager<T>>
Used by engine to gain access to this property’s transition queue
sourcefn ease_to(&mut self, new_value: T, duration_frames: u64, curve: EasingCurve)
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
sourcefn ease_to_later(
&mut self,
new_value: T,
duration_frames: u64,
curve: EasingCurve
)
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.