Native animation component.

Provides access to a native animation component instance.

.TypeName: string 

.animation: null | Animation 

Animation set for this component


Set animation to play.

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

.playCount: number 

Number of times the animation is played.


Set play count. Set to 0 to loop indefinitely.

.speed: number 


Speed factor at which the animation is played.



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.