pub struct AnimationState { /* private fields */ }
Expand description

The live animation state for a skeleton, allowing animation layering and crossfading.

Spine API Reference

Implementations

Clears all animations in all track entries in this animation state.

Clears animations for the given track entry index in this animation state.

Sets the animation for the given track by name, clearing any queued tracks, and returning the track index. If the track index doesn’t exist then it will be created.

Safety

This function should only be called with valid animation names. It is faster than the safe alternative, AnimationState::set_animation_by_name, but will likely segfault if the animation does not exist.

Sets the animation for the given track by name, clearing any queued tracks, and returning the track index. If the track index doesn’t exist then it will be created.

Errors

Returns SpineError::NotFound if an animation doesn’t exist with the given name.

Sets the animation for the given track, clearning any queued tracks, and returning the track index. If the track index doesn’t exist then it will be created.

Queues the animation in the given track by name, returning the track index. If the track index doesn’t exist then it will be created.

Safety

This function should only be called with valid animation names. It is faster than the safe alternative, AnimationState::add_animation_by_name, but will likely segfault if the animation does not exist.

Queues the animation in the given track by name, returning the track index. If the track index doesn’t exist then it will be created.

Errors

Returns SpineError::NotFound if an animation doesn’t exist with the given name.

Queues the animation in the given track, returning the track index. If the track index doesn’t exist then it will be created.

Set the event listener on this animation state. An animation state can only have one event listener at a time. See the documentation for Event for more information.

Trait Implementations

Formats the value using the given formatter. Read more
Executes the destructor for this type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.