Struct rusty_spine::AnimationStateData
source · [−]pub struct AnimationStateData { /* private fields */ }
Expand description
Animation settings used to instantiate AnimationState.
Mix durations can be applied to automatically blend between animations. For example, to
smoothly mix between a walk
and run
animation for 0.2
seconds:
animation_state_data.set_mix_by_name("walk", "run", 0.2);
This operation is one way, so to blend back and forth between the two animations, two mix durations must be specified:
animation_state_data.set_mix_by_name("walk", "run", 0.2);
animation_state_data.set_mix_by_name("run", "walk", 0.2);
Implementations
sourceimpl AnimationStateData
impl AnimationStateData
pub fn new(skeleton_data: Arc<SkeletonData>) -> Self
pub fn set_mix_by_name(&mut self, from_name: &str, to_name: &str, duration: f32)
pub fn set_mix(&mut self, from: &Animation, to: &Animation, duration: f32)
pub fn get_mix(&mut self, from: &Animation, to: &Animation) -> f32
pub fn skeleton_data(&self) -> CTmpRef<'_, Self, SkeletonData>
pub fn skeleton_data_mut(&mut self) -> CTmpMut<'_, Self, SkeletonData>
pub fn default_mix(&self) -> f32
pub fn set_default_mix(&mut self, value: f32)
pub unsafe fn entries(&self) -> *const c_void
pub fn c_ptr(&self) -> *mut spAnimationStateData
Trait Implementations
sourceimpl Debug for AnimationStateData
impl Debug for AnimationStateData
sourceimpl Drop for AnimationStateData
impl Drop for AnimationStateData
sourceimpl NewFromPtr<spAnimationStateData> for AnimationStateData
impl NewFromPtr<spAnimationStateData> for AnimationStateData
unsafe fn new_from_ptr(
c_animation_state_data: *const spAnimationStateData
) -> Self
Auto Trait Implementations
impl RefUnwindSafe for AnimationStateData
impl Send for AnimationStateData
impl Sync for AnimationStateData
impl Unpin for AnimationStateData
impl UnwindSafe for AnimationStateData
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more