Capítulo 376 de 411

Chapter 376: .vars

Core Idea

[read-only] The vars configuration object used to create the ScrollTrigger instance

Code Examples

let st = ScrollTrigger.create({
  trigger: ".trigger",
  start: "top center",
  end: "+=500",
});

console.log(st.vars); // {trigger: ".trigger", start: "top center", end: "+=500"}
  • What it demonstrates: typical usage of .vars in a GSAP animation.

Key Takeaways

  1. [read-only] The vars configuration object used to create the ScrollTrigger instance