Skip to main content
Hyperframes uses GSAP for animation. Timelines are paused and controlled by the runtime — you define the animations, the framework handles playback. For background on how animation runtimes plug into Hyperframes, see Frame Adapters.

Setup

Include GSAP and create a paused timeline:
index.html
The key you use in window.__timelines must match the data-composition-id attribute on your composition’s root element. See Compositions for how the root element is structured.

Key Rules

  1. Always create timelines with { paused: true } — the framework controls playback via deterministic seeking
  2. Register timelines on window.__timelines with the data-composition-id as key
  3. Use the position parameter (3rd argument) for absolute timing: tl.to(el, vars, 1.5)
  4. Only animate visual properties — never control media playback in scripts

Supported Methods

Supported Properties

opacity, x, y, scale, scaleX, scaleY, rotation, color, backgroundColor, and other CSS-animatable transform/color properties. Do not animate visibility, width, or height — these break deterministic rendering.

Timeline Duration and Composition Duration

A composition’s duration equals its GSAP timeline duration. The two are directly linked:
compositions/intro-anim.html
If your composition contains a video clip that is 283 seconds long, but your last GSAP animation ends at 8 seconds, the composition will be only 8 seconds long and the video will be cut short. To extend the timeline to match the video:
index.html
This is one of the most common mistakes in Hyperframes. If your video cuts off early, the timeline is too short. See Common Mistakes: Composition Duration Shorter Than Video for more details.

What NOT to Do

These patterns will break your composition or cause sync issues:
index.html
The framework automatically manages media playback, clip lifecycle, and sub-composition nesting. Scripts that duplicate this behavior will conflict.

Sub-Composition Timelines

Each nested composition registers its own timeline. The framework automatically nests sub-composition timelines into the parent based on data-start:
compositions/intro-anim.html
Don’t animate width, height, top, or left directly on <video> elements — this can cause the browser to stop rendering frames. Wrap the video in a <div> and animate the wrapper instead. See Common Mistakes for a detailed explanation.

Next Steps

Compositions

Understand the building blocks that timelines animate

Frame Adapters

Learn how GSAP plugs into the render pipeline

Common Mistakes

Avoid pitfalls that break animations

HTML Schema Reference

Full reference for composition attributes