Frontory

Open code, practice, and notes →

Download source with English comments · for reading

GSAP · 06 Labels and Overlap

Series contents · Technology map

Stage: Tweens and the time model · Editable example · Storage ID: gsap-step-06

Goals and learning outcomes

Prerequisites

Prepare the exercise results on Start Interval and Order from Unit 5, “Stagger Order”.

Key concepts and explanations

Label

A label gives a meaningful name to a time. Step buttons can navigate by name instead of by number.

Relative Position

A relative position expresses a gap relative to the preceding action. A negative gap overlaps actions.

Practice setup

First check the execution scope guidance on the example screen. The following environment is for extending the assignment in a separate project. The existing gsap-01·02·03 are starting examples. Write new units in a separate local GSAP project. The gsap-02 preview uses native scroll events; install and register ScrollTrigger in an external project. Preserve CSP and iframe isolation.

The linked example is a starting point. It does not implement every task below. Complete work beyond its supported scope in a separate project.

Practice tasks

  1. In src/day-6.js of a separate practice project, use addLabel and relative positions to build a timeline for the heading, cards, and buttons. Refer to the existing Unit 1·14·28 examples only as starting points.
  2. Input conditions: intro·ready labels. Baseline: 0 seconds. Run under baseline conditions, then record observations and errors in notes/day-6.md.
  3. Variable: Overlap; changed value: -0.3 seconds. Run again using the same input path. Deliverable to save: a schedule of start and end times for each action. Hypothesis to check: The total length decreases while the order is preserved. Compare with the actual results and record whether they agree and the causes of any differences.

Variables to observe

VariableBaselineChangeExpected change / hypothesis
Overlap0 seconds-0.3 secondsThe total length decreases while the order is preserved.

Predictions in this table are not measured results. Change one condition at a time and record why the actual result differs.

Completion criteria

Self-check

  1. Which processing stage does Label affect in this exercise? Input case: intro·ready labels.
  2. Variable: Overlap. Hypothesis to check: The total length decreases while the order is preserved. Did the actual results match the hypothesis? Explain the evidence in terms of Relative Position.

Official references

Linked example and execution scope

Example source · Runtime environments and limits

This is an experiment on Labels and Overlap. It supports direct interaction and cleans up the resources it uses.

Source code and records are not overwritten automatically. Resetting an existing example also preserves your notes.

Next learning

Previous: Stagger Order · Next: Playback Controls

Open code, practice, and notes →