ReadonlyanimationAnimation this state plays
Playback speed multiplier; negative values play backwards
Whether playback wraps around at the animation's ends
Called once when a non-looping state reaches its end
The state has already stopped, holding its final pose, so the callback can start the next animation.
Called each time a looping state wraps around its duration
ReadonlyplayerPlayer that owns this state
Current playback time in seconds
Writing it moves the playhead without applying the pose. Use gotoAndStop() to seek and show the pose at once.
Share of the blend when several playing states drive the same property through tracks with the same label
Weights are relative: at 1 and 3, the property ends up a quarter one state and three quarters the other. They don't fade a state against the rest pose; a state that is the only one driving a property applies in full at any weight above 0. At 0 the state keeps advancing but writes nothing.
Stops playback at a time and applies that pose to the target right away
The pose is this state's alone, not blended with others; a state still playing overwrites the properties it drives on the next update. Does nothing once the owning player is destroyed.
Playback time in seconds
This state for chaining
Starts or resumes playback from the current time
A one-shot animation that already finished completes again on the next update; use
gotoAndPlay(0) to restart it, or
gotoAndPlay(animation.duration) for one a negative animationSpeed plays backwards. Does
nothing once the owning player is destroyed.
This state for chaining
Stops playback, holding the current time and pose
To rewind, call gotoAndStop(0).
This state for chaining
Playback state for a single Animation on an AnimationPlayer
AnimationPlayer#play and AnimationPlayer#getState return one. Use it to control playback, looping, speed and blend weight. The playback methods follow pixi's
AnimatedSprite: stop() freezes in place and play() resumes from there.Example