AnimationClip class
An instance of an Animation that has been bound to a specific Node.
Create one with Node.createAnimationClip. Each clip carries its own playing, playbackTime, playbackTimeScale, weight, and loop state, so the same Animation can be played at different speeds and blends across multiple subtrees.
Multiple clips on the same node are blended by an internal
AnimationPlayer that normalizes their weights when the sum exceeds
1.
Constructors
- AnimationClip(Animation _animation, Node bindTarget)
-
Binds
_animationto the node subtree rooted atbindTarget.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- loop ↔ bool
-
Whether the clip should wrap around at the end of the animation
(or the beginning, when playing in reverse) instead of pausing.
getter/setter pair
- playbackTime ↔ double
-
The current playback position in seconds, in
[0, Animation.endTime].getter/setter pair - playbackTimeScale ↔ double
-
Speed multiplier applied to delta times when advance is called.
getter/setter pair
- playing ↔ bool
-
Whether advance should integrate elapsed time into playbackTime.
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- weight ↔ double
-
Blend weight in
[0, 1], used by AnimationPlayer to mix this clip with other concurrently playing clips on the same node.getter/setter pair
Methods
-
advance(
double deltaTime) → void -
Advances playbackTime by
deltaTimeseconds (scaled by playbackTimeScale). -
applyToBindings(
Map< Node, AnimationTransforms> transformDecomps, double weightMultiplier) → void -
Evaluates each bound channel at playbackTime and accumulates the
result into
transformDecomps. -
gotoAndPlay(
double time) → void -
Seeks to
time(clamped to[0, Animation.endTime]) and starts playing. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
pause(
) → void - Pauses playback at the current playbackTime.
-
play(
) → void -
Starts (or resumes) playback. Equivalent to setting playing to
true. -
replay(
) → void - Seeks back to the beginning and starts playing.
-
seek(
double time) → void -
Sets playbackTime to
time(clamped to[0, Animation.endTime]). -
stop(
) → void - Pauses playback and seeks back to the beginning.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited