2.0 KiB
2.0 KiB
HyperFrames Composition Project
Skills
This project uses AI agent skills for framework-specific patterns. Install them if not already present:
npx skills add heygen-com/hyperframes
Skills encode patterns like window.__timelines registration, data-* attribute semantics, and shader-compatible CSS rules that are not in generic web docs. Using them produces correct compositions from the start.
Commands
npx hyperframes preview # preview in browser (studio editor)
npx hyperframes render # render to MP4
npx hyperframes lint # validate compositions (errors + warnings)
npx hyperframes lint --json # machine-readable output for CI
npx hyperframes docs <topic> # reference docs in terminal
Project Structure
index.html— main composition (root timeline)compositions/— sub-compositions referenced viadata-composition-srcassets/— media files (video, audio, images)meta.json— project metadata (id, name)transcript.json— whisper word-level transcript (if generated)
Linting — Always Run After Changes
After creating or editing any .html composition, run the linter before considering the task complete:
npx hyperframes lint
Fix all errors before presenting the result.
Key Rules
- Every timed element needs
data-start,data-duration, anddata-track-index - Visible timed elements must have
class="clip"— the framework uses this for visibility control - GSAP timelines must be paused and registered on
window.__timelines:window.__timelines = window.__timelines || {}; window.__timelines["composition-id"] = gsap.timeline({ paused: true }); - Videos use
mutedwith a separate<audio>element for the audio track - Sub-compositions use
data-composition-src="compositions/file.html" - Only deterministic logic — no
Date.now(), noMath.random(), no network fetches
Documentation
Full docs: https://hyperframes.heygen.com/introduction
Machine-readable index for AI tools: https://hyperframes.heygen.com/llms.txt