Capítulo 82 de 411

Chapter 82: Timeline.set()

Core Idea

set() adds a zero-duration tween that instantly applies values when the playhead reaches that point — shorthand for add(gsap.to(target, {duration: 0, ...})).

Reference Tables

ParameterTypeDescription
targetObject | Array | Stringtarget(s) or selector text
varsObjectproperties to set
positionNumber | Stringwhere in the timeline

Code Examples

tl.set(".box", { visibility: "visible" }, "start");

Connects To

  • Timeline.to(): the same mechanism with a non-zero duration.