Capítulo 45 de 411

Chapter 45: Timeline.data

Core Idea

data is a free-form slot for storing arbitrary custom data on a Timeline instance, initially seeded from vars.data if provided at creation.

Code Examples

let tl = gsap.timeline({ data: { id: "intro" } });
console.log(tl.data.id); // "intro"

Key Takeaways

  1. Handy for attaching app-specific metadata to a timeline without a separate lookup map.