AnimationState Class

Extends Playable

Module: cc

The AnimationState gives full control over animation playback process. In most cases the Animation Component is sufficient and easier to use. Use the AnimationState if you need full control.

Index

Properties
  • animator AnimationAnimator
  • curves Object[] The curves list.
  • delay Number The start delay which represents the number of seconds from an animation's start time to the start of
  • repeatCount Number The animation's iteration count property.
  • duration Number The iteration duration of this animation in seconds.
  • speed Number The animation's playback speed.
  • wrapMode WrapMode Wrapping mode of the playing animation.
  • time Number The current time of this animation in seconds.
  • clip AnimationClip The clip that is being played by this animation state.
  • name String The name of the playing animation.
  • isPlaying Boolean Is playing or paused in play mode?
  • isPaused Boolean Is currently paused? This can be true even if in edit mode(isPlaying == false).
Methods

Details

Properties

animator
meta description
Type AnimationAnimator
Defined in cocos2d/animation/animation-state.js:73
curves

The curves list.

meta description
Type Object[]
Defined in cocos2d/animation/animation-state.js:80
delay

The start delay which represents the number of seconds from an animation's start time to the start of the active interval.

meta description
Type Number
Defined in cocos2d/animation/animation-state.js:90
repeatCount

The animation's iteration count property.

A real number greater than or equal to zero (including positive infinity) representing the number of times to repeat the animation node.

Values less than zero and NaN values are treated as the value 1.0 for the purpose of timing model calculations.

meta description
Type Number
Defined in cocos2d/animation/animation-state.js:101
duration

The iteration duration of this animation in seconds. (length)

meta description
Type Number
Defined in cocos2d/animation/animation-state.js:118
speed

The animation's playback speed. 1 is normal playback speed.

meta description
Type Number
Defined in cocos2d/animation/animation-state.js:128
wrapMode

Wrapping mode of the playing animation. Notice : dynamic change wrapMode will reset time and repeatCount property

meta description
Type WrapMode
Defined in cocos2d/animation/animation-state.js:137
time

The current time of this animation in seconds.

meta description
Type Number
Defined in cocos2d/animation/animation-state.js:151
clip

The clip that is being played by this animation state.

meta description
Type AnimationClip
Defined in cocos2d/animation/animation-state.js:442
name

The name of the playing animation.

meta description
Type String
Defined in cocos2d/animation/animation-state.js:453
isPlaying

Is playing or paused in play mode?

meta description
Type Boolean
Defined in cocos2d/animation/playable.js:44
isPaused

Is currently paused? This can be true even if in edit mode(isPlaying == false).

meta description
Type Boolean
Defined in cocos2d/animation/playable.js:56

Methods

constructor
meta description
Defined in cocos2d/animation/animation-state.js:50
Parameters
onPlay
meta description
Defined in cocos2d/animation/playable.js:71
onPause
meta description
Defined in cocos2d/animation/playable.js:76
onResume
meta description
Defined in cocos2d/animation/playable.js:81
onStop
meta description
Defined in cocos2d/animation/playable.js:86
onError
meta description
Defined in cocos2d/animation/playable.js:91
Parameters
play

Play this animation.

meta description
Defined in cocos2d/animation/playable.js:100
stop

Stop this animation.

meta description
Defined in cocos2d/animation/playable.js:121
pause

Pause this animation.

meta description
Defined in cocos2d/animation/playable.js:136
resume

Resume this animation.

meta description
Defined in cocos2d/animation/playable.js:148
step

Perform a single frame step.

meta description
Defined in cocos2d/animation/playable.js:160

results matching ""

    No results matching ""