Phaser API Documentation

yoyo: boolean


Should the current animation yoyo? An animation that yoyos will play in reverse, from the end to the start, before then repeating or completing. An animation that does not yoyo will just play from the start to the end.

This value is set when a new animation is loaded into this component, but can also be modified at run-time.

You can change the yoyo by providing a new value in the PlayAnimationConfig object.

Prior to Phaser 3.50 this property was private and called _yoyo.

Default: false
Since: 3.50.0