AnimationComponent

Native animation component.

Provides access to a native animation component instance.

.TypeName: string 

.animation: null | Animation 

Animation set for this component

.animation 

Set animation to play.

Make sure to retarget the animation to affect the right objects.

.playCount: number 

Number of times the animation is played.

.playCount 

Set play count. Set to 0 to loop indefinitely.

.speed: number 

0.8.5+

Speed factor at which the animation is played.

.speed 

0.8.5+

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.

.state: AnimationState 

Current playing state of the animation

.pause() ⇒ void 

Pause animation.

.play() ⇒ void 

Play animation.

If the animation is currently paused, resumes from that position. If the animation is already playing, does nothing.

To restart the animation, stop it first.

.stop() ⇒ void 

Stop animation.