Animation class
Stores a list of timelines to animate a skeleton's pose over time.
See Applying Animations in the Spine Runtimes Guide.
Constructors
- Animation(String name)
-
Creates a new animation. The timelines must be set before use.
factory
-
Animation.fromPointer(Pointer<
spine_animation_wrapper> _ptr)
Properties
- bones → ArrayInt
-
The Skeleton::getBones() indices affected by this animation.
no setter
- color → Color
-
The color of the animation as it was in Spine, or a default color if
nonessential data was not exported.
no setter
- duration ↔ double
-
The duration of the animation in seconds, which is usually the highest
time of all frames in the timeline. The duration is used to know when it
has completed and when it should loop back to the start.
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- name → String
-
The animation's name, which is unique across all animations in the
skeleton.
no setter
-
nativePtr
→ Pointer<
NativeType> -
Get the native pointer for FFI calls
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timelines → ArrayTimeline
-
If this list or the timelines it contains are modified, the timelines and
bones must be set again to recompute the animation's bone indices and
timeline property IDs.
no setter
Methods
-
apply(
Skeleton skeleton, double lastTime, double time, bool loop, ArrayEvent? events, double alpha, MixFrom from, bool add, bool out, bool appliedPose) → void - Applies the animation's timelines to the specified skeleton.
-
dispose(
) → void -
hasTimeline(
ArrayPropertyId ids) → bool - Returns true if this animation contains a timeline with any of the specified property IDs.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setTimelines(
ArrayTimeline timelines, ArrayInt bones) → void - Sets the timelines and bone indices.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
search(
ArrayFloat values, double target) → int -
targetAfter the first and before the last entry. -
search2(
ArrayFloat values, double target, int step) → int