Capítulo 38 de 411
add() inserts a tween, timeline, callback, or label (or an array of them) into the timeline at a specific position.
| Parameter | Type | Default | Description |
|---|---|---|---|
child | Tween | Timeline | Label | Callback | Array | — | what to add |
position | Number | String | Label | "+=0" | insertion point; a not-yet-existing label is auto-added at the current end |
Returns: self (chainable).
tl.add(childTween, "+=0.5"); // insert half a second after the current end
.to()/.from()/.call() shortcuts.position parameter (relative "+=n", absolute number, or a label) controls exactly where in the sequence something lands — see the Position Parameter guide for the full syntax.position argument used across nearly every Timeline insertion method.