AnimationComponent
AnimationComponent
Native animation component
Provides access to a native animation component instance
Kind: global class
.animation
Set animation to play
Make sure to retarget the animation to affect the right objects.
Kind: instance property of AnimationComponent
Param | Type | Description |
---|---|---|
animation | Animation | to play |
.animation ⇒ Animation
Kind: instance property of AnimationComponent
Returns: Animation - animation set for this component
.playCount
Set play count. Set to 0
to loop indefinitely.
Kind: instance property of AnimationComponent
Param | Type | Description |
---|---|---|
playCount | number | Number of times to repeat the animation |
.playCount ⇒ number
Kind: instance property of AnimationComponent
Returns: number - Number of times the animation is played
.speed
Set speed. Set to negative values to run the animation backwards.
Setting speed has an immediate effect for the current frame’s update and will continue with the speed from the current point in the animation.
Kind: instance property of AnimationComponent
0.8.10+
Param | Type | Description |
---|---|---|
speed | number | New speed at which to play the animation. |
.speed ⇒ number
Kind: instance property of AnimationComponent
Returns: number - Speed factor at which the animation is played
0.8.10+
.state ⇒ AnimationState
Kind: instance property of AnimationComponent
Returns: AnimationState - Current playing state of the animation
.play ()
Play animation
Kind: instance method of AnimationComponent
.stop ()
Stop animation
Kind: instance method of AnimationComponent
.pause ()
Pause animation
Kind: instance method of AnimationComponent