Capítulo 345 de 411

Chapter 345: progress

Core Idea

[read-only] The overall progress of the ScrollTrigger instance where 0 is at the start, 0.5 is in the middle, and 1 is at the end.

Code Examples

ScrollTrigger.create({
  trigger: ".trigger",
  start: "top center",
  end: "+=500",
  onUpdate: (self) => console.log("progress:", self.progress),
});
  • What it demonstrates: typical usage of progress in a GSAP animation.

Key Takeaways

  1. [read-only] The overall progress of the ScrollTrigger instance where 0 is at the start, 0.5 is in the middle, and 1 is at the end.