Capítulo 43 de 411

Chapter 43: Timeline.clear()

Core Idea

clear() empties the timeline of all tweens, timelines, and callbacks, optionally leaving labels intact.

Reference Tables

ParameterTypeDefaultDescription
labelsBooleantruewhether labels are cleared too

Returns: self.

Code Examples

tl.clear(); // remove everything, including labels
tl.clear(false); // remove content but keep labels

Key Takeaways

  1. Useful for resetting a timeline instance for reuse instead of creating a new one.