Capítulo 131 de 411

Chapter 131: Tween.yoyo()

Core Idea

yoyo() gets or sets whether repeats alternate direction — same behavior as Timeline.yoyo(), requires a non-zero repeat to matter.

Code Examples

gsap.to(el, { x: 100, repeat: 3, yoyo: true });

Connects To

  • Timeline.yoyo(): identical mechanism on the Timeline class.
  • Tween.repeat(): yoyo has no effect without a non-zero repeat count.