npx hyperframes lint (see CLI).
Animating video element dimensions
Animating video element dimensions
Symptom: Video frames stop updating, or browser performance drops severely.Cause: GSAP animating After (fixed):Use a non-timed wrapper
width, height, top, left directly on a <video> element can cause the browser to stop rendering frames.Before (broken):index.html
index.html
index.html
<div> for visual effects like picture-in-picture. Animate the wrapper; let the video fill it via CSS.Controlling media playback in scripts
Controlling media playback in scripts
Symptom: Audio/video playback is out of sync, or plays when it should not.Cause: Calling After (fixed):The framework reads
video.play(), video.pause(), or setting audio.currentTime in your scripts. The framework owns all media playback.Before (broken):index.html
index.html
data-start, data-media-start, and data-volume to control when and how media plays. See Compositions: Two Layers for the separation between HTML primitives and scripts.Composition duration shorter than video
Composition duration shorter than video
Symptom: Video plays for a few seconds then stops. Timeline shows 8-10 seconds even though the video is minutes long.Cause: The composition duration equals the GSAP timeline duration, not After (fixed):
data-duration on the video. If your last GSAP animation ends at 8 seconds, the composition is 8 seconds long — regardless of how long the video source is.Before (broken):index.html
index.html
tl.set({}, {}, TIME) adds a zero-duration tween at the specified time, extending the timeline without affecting any elements.Missing class='clip' on timed elements
Missing class='clip' on timed elements
Symptom: Elements are always visible, ignoring their After (fixed):
data-start and data-duration timing.Cause: The class="clip" attribute tells the runtime to manage the element’s visibility lifecycle. Without it, the element is always rendered.Before (broken):index.html
index.html
The linter catches this one:
npx hyperframes lint will flag timed elements missing class="clip".Oversized source images
Oversized source images
Symptom: Preview stutters during scenes with images on screen. Render is slower than expected.Cause: Source images at much higher resolution than the canvas. Chrome decodes images to raw RGBA bitmaps before displaying them, and bitmap size is After (sized to the canvas):Rule of thumb: source images at most 2x the canvas dimensions. For a 1920×1080 composition, 3840×2160 is already plenty. See Performance: Image sizing.
width × height × 4 bytes — independent of file size on disk. A 7000×5000 JPEG is 140MB decoded, even if the file is only 2MB.Displaying such an image in a 384×1080 region wastes memory and forces the compositor to resample a huge texture every frame.Before (bloated):index.html
Terminal
index.html
Heavy backdrop-filter stacks
Heavy backdrop-filter stacks
Symptom: Specific scenes drop to 5-10fps in preview. The composition is fine elsewhere.Cause: After (3 tuned layers):Guidelines:
backdrop-filter: blur() on large elements, especially stacked at high radii. Each blur layer forces the compositor to sample pixels behind the element, run a blur kernel, and composite the result. Stacked layers multiply the cost.Before (expensive):- Keep stacked
backdrop-filterlayers to 2-3 per region - Avoid radii above 64px over large areas — the biggest radii dominate the total cost
- For a static blur effect, pre-render it into a PNG once and overlay with a regular
<img>
Timeline key doesn't match data-composition-id
Timeline key doesn't match data-composition-id
Symptom: Animations don’t play. The composition appears static.Cause: The key used in After (fixed):
window.__timelines must exactly match the data-composition-id attribute on the composition root element.Before (broken):index.html
index.html
Debugging Checklist
When something does not work, check in this order:- Run the linter:
npx hyperframes lint— catches most structural issues - Timeline registered? Is
window.__timelines["<id>"]set? Does the key matchdata-composition-id? - GSAP-only animations? Only animate visual properties (opacity, transform, color) — see GSAP Animation
- Timeline long enough? Add
tl.set({}, {}, DURATION)at the end — see Timeline Duration - Console errors? Open browser console — runtime errors show as
[Browser:ERROR] - Still stuck? See Troubleshooting for environment and rendering issues
Next Steps
Troubleshooting
Fix environment and rendering issues
GSAP Animation
Review animation rules and patterns
HTML Schema Reference
Full attribute reference and checklist
Data Attributes
Timing, media, and composition attributes