mindforge-cc 11.5.1 → 11.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agent/mindforge/skill-tdd.md +53 -0
- package/.agent/mindforge/skills-index.md +118 -0
- package/.agent/mindforge/systematic-debug.md +60 -0
- package/.agent/skills/1password-skill/SKILL.md +156 -0
- package/.agent/skills/1password-skill/references/cli-examples.md +31 -0
- package/.agent/skills/1password-skill/references/get-started.md +21 -0
- package/.agent/skills/article-illustrator/SKILL.md +199 -0
- package/.agent/skills/article-illustrator/references/prompt-construction.md +426 -0
- package/.agent/skills/article-illustrator/references/style-presets.md +80 -0
- package/.agent/skills/article-illustrator/references/styles.md +224 -0
- package/.agent/skills/article-illustrator/references/usage.md +50 -0
- package/.agent/skills/article-illustrator/references/workflow.md +332 -0
- package/.agent/skills/arxiv/SKILL.md +275 -0
- package/.agent/skills/blogwatcher/SKILL.md +130 -0
- package/.agent/skills/code-wiki/SKILL.md +438 -0
- package/.agent/skills/code-wiki/templates/README.md +31 -0
- package/.agent/skills/code-wiki/templates/architecture.md +30 -0
- package/.agent/skills/code-wiki/templates/getting-started.md +47 -0
- package/.agent/skills/code-wiki/templates/module.md +38 -0
- package/.agent/skills/codebase-inspection/SKILL.md +109 -0
- package/.agent/skills/comic-creator/SKILL.md +240 -0
- package/.agent/skills/comic-creator/references/analysis-framework.md +176 -0
- package/.agent/skills/comic-creator/references/auto-selection.md +71 -0
- package/.agent/skills/comic-creator/references/base-prompt.md +98 -0
- package/.agent/skills/comic-creator/references/character-template.md +180 -0
- package/.agent/skills/comic-creator/references/ohmsha-guide.md +85 -0
- package/.agent/skills/comic-creator/references/partial-workflows.md +106 -0
- package/.agent/skills/comic-creator/references/storyboard-template.md +143 -0
- package/.agent/skills/comic-creator/references/workflow.md +401 -0
- package/.agent/skills/concept-diagrams/SKILL.md +355 -0
- package/.agent/skills/concept-diagrams/references/dashboard-patterns.md +43 -0
- package/.agent/skills/concept-diagrams/references/infrastructure-patterns.md +144 -0
- package/.agent/skills/concept-diagrams/references/physical-shape-cookbook.md +42 -0
- package/.agent/skills/creative-ideation/SKILL.md +144 -0
- package/.agent/skills/creative-ideation/references/full-prompt-library.md +110 -0
- package/.agent/skills/devops-cli/SKILL.md +149 -0
- package/.agent/skills/devops-cli/references/app-discovery.md +112 -0
- package/.agent/skills/devops-cli/references/authentication.md +59 -0
- package/.agent/skills/devops-cli/references/cli-reference.md +104 -0
- package/.agent/skills/devops-cli/references/running-apps.md +171 -0
- package/.agent/skills/devops-watchers/SKILL.md +103 -0
- package/.agent/skills/docker-management/SKILL.md +273 -0
- package/.agent/skills/domain-intel/SKILL.md +96 -0
- package/.agent/skills/duckduckgo-search/SKILL.md +230 -0
- package/.agent/skills/github-auth/SKILL.md +240 -0
- package/.agent/skills/github-code-review/SKILL.md +474 -0
- package/.agent/skills/github-code-review/references/review-output-template.md +74 -0
- package/.agent/skills/github-issues/SKILL.md +363 -0
- package/.agent/skills/github-issues/templates/bug-report.md +35 -0
- package/.agent/skills/github-issues/templates/feature-request.md +31 -0
- package/.agent/skills/github-pr-workflow/SKILL.md +360 -0
- package/.agent/skills/github-pr-workflow/references/ci-troubleshooting.md +183 -0
- package/.agent/skills/github-pr-workflow/references/conventional-commits.md +71 -0
- package/.agent/skills/github-pr-workflow/templates/pr-body-bugfix.md +35 -0
- package/.agent/skills/github-pr-workflow/templates/pr-body-feature.md +33 -0
- package/.agent/skills/github-repo-management/SKILL.md +509 -0
- package/.agent/skills/github-repo-management/references/github-api-cheatsheet.md +161 -0
- package/.agent/skills/godmode/SKILL.md +396 -0
- package/.agent/skills/godmode/references/jailbreak-templates.md +128 -0
- package/.agent/skills/godmode/references/refusal-detection.md +142 -0
- package/.agent/skills/hyperframes/SKILL.md +182 -0
- package/.agent/skills/hyperframes/references/cli.md +185 -0
- package/.agent/skills/hyperframes/references/composition.md +129 -0
- package/.agent/skills/hyperframes/references/features.md +289 -0
- package/.agent/skills/hyperframes/references/gsap.md +136 -0
- package/.agent/skills/hyperframes/references/troubleshooting.md +137 -0
- package/.agent/skills/hyperframes/references/website-to-video.md +145 -0
- package/.agent/skills/jupyter-live-kernel/SKILL.md +160 -0
- package/.agent/skills/kanban-orchestrator/SKILL.md +209 -0
- package/.agent/skills/kanban-worker/SKILL.md +188 -0
- package/.agent/skills/llm-wiki/SKILL.md +499 -0
- package/.agent/skills/meme-generation/SKILL.md +122 -0
- package/.agent/skills/node-inspect-debugger/SKILL.md +312 -0
- package/.agent/skills/obsidian/SKILL.md +60 -0
- package/.agent/skills/osint-investigation/SKILL.md +269 -0
- package/.agent/skills/osint-investigation/templates/source-template.md +59 -0
- package/.agent/skills/oss-forensics/SKILL.md +422 -0
- package/.agent/skills/oss-forensics/references/evidence-types.md +89 -0
- package/.agent/skills/oss-forensics/references/github-archive-guide.md +184 -0
- package/.agent/skills/oss-forensics/references/investigation-templates.md +131 -0
- package/.agent/skills/oss-forensics/references/recovery-techniques.md +164 -0
- package/.agent/skills/oss-forensics/templates/forensic-report.md +151 -0
- package/.agent/skills/oss-forensics/templates/malicious-package-report.md +43 -0
- package/.agent/skills/parallel-cli/SKILL.md +384 -0
- package/.agent/skills/pinggy-tunnel/SKILL.md +302 -0
- package/.agent/skills/pixel-art/SKILL.md +209 -0
- package/.agent/skills/pixel-art/references/palettes.md +49 -0
- package/.agent/skills/plan/SKILL.md +331 -0
- package/.agent/skills/polymarket/SKILL.md +75 -0
- package/.agent/skills/polymarket/references/api-endpoints.md +220 -0
- package/.agent/skills/python-debugpy/SKILL.md +368 -0
- package/.agent/skills/requesting-code-review/SKILL.md +273 -0
- package/.agent/skills/research-paper-writing/SKILL.md +2367 -0
- package/.agent/skills/research-paper-writing/references/autoreason-methodology.md +394 -0
- package/.agent/skills/research-paper-writing/references/checklists.md +434 -0
- package/.agent/skills/research-paper-writing/references/citation-workflow.md +563 -0
- package/.agent/skills/research-paper-writing/references/experiment-patterns.md +728 -0
- package/.agent/skills/research-paper-writing/references/human-evaluation.md +476 -0
- package/.agent/skills/research-paper-writing/references/paper-types.md +481 -0
- package/.agent/skills/research-paper-writing/references/reviewer-guidelines.md +433 -0
- package/.agent/skills/research-paper-writing/references/sources.md +191 -0
- package/.agent/skills/research-paper-writing/references/writing-guide.md +474 -0
- package/.agent/skills/research-paper-writing/templates/README.md +251 -0
- package/.agent/skills/rest-graphql-debug/SKILL.md +507 -0
- package/.agent/skills/s6-container-supervision/SKILL.md +171 -0
- package/.agent/skills/scrapling/SKILL.md +328 -0
- package/.agent/skills/sherlock/SKILL.md +186 -0
- package/.agent/skills/simplify-code/SKILL.md +168 -0
- package/.agent/skills/skill-authoring/SKILL.md +158 -0
- package/.agent/skills/spike/SKILL.md +190 -0
- package/.agent/skills/subagent-driven-development/SKILL.md +345 -0
- package/.agent/skills/subagent-driven-development/references/context-budget-discipline.md +53 -0
- package/.agent/skills/subagent-driven-development/references/gates-taxonomy.md +93 -0
- package/.agent/skills/systematic-debugging/SKILL.md +360 -0
- package/.agent/skills/test-driven-development/SKILL.md +336 -0
- package/.agent/skills/video-orchestrator/SKILL.md +194 -0
- package/.agent/skills/video-orchestrator/references/examples.md +227 -0
- package/.agent/skills/video-orchestrator/references/intake.md +166 -0
- package/.agent/skills/video-orchestrator/references/kanban-setup.md +278 -0
- package/.agent/skills/video-orchestrator/references/monitoring.md +180 -0
- package/.agent/skills/video-orchestrator/references/role-archetypes.md +298 -0
- package/.agent/skills/video-orchestrator/references/tool-matrix.md +317 -0
- package/.agent/skills/web-pentest/SKILL.md +332 -0
- package/.agent/skills/web-pentest/references/bypass-techniques.md +133 -0
- package/.agent/skills/web-pentest/references/exploitation-techniques.md +204 -0
- package/.agent/skills/web-pentest/references/scope-enforcement.md +110 -0
- package/.agent/skills/web-pentest/references/vuln-taxonomy.md +81 -0
- package/.agent/skills/web-pentest/templates/authorization.md +69 -0
- package/.agent/skills/web-pentest/templates/pentest-report.md +178 -0
- package/.claude/commands/mindforge/skill-tdd.md +53 -0
- package/.claude/commands/mindforge/skills-index.md +118 -0
- package/.claude/commands/mindforge/systematic-debug.md +60 -0
- package/.mindforge/config.json +2 -2
- package/.mindforge/memory/sync-manifest.json +1 -1
- package/.mindforge/skills/arxiv/SKILL.md +294 -0
- package/.mindforge/skills/blogwatcher/SKILL.md +147 -0
- package/.mindforge/skills/code-wiki/SKILL.md +457 -0
- package/.mindforge/skills/codebase-inspection/SKILL.md +126 -0
- package/.mindforge/skills/concept-diagrams/SKILL.md +373 -0
- package/.mindforge/skills/creative-ideation/SKILL.md +162 -0
- package/.mindforge/skills/domain-intel/SKILL.md +116 -0
- package/.mindforge/skills/duckduckgo-search/SKILL.md +249 -0
- package/.mindforge/skills/github-code-review/SKILL.md +493 -0
- package/.mindforge/skills/github-issues/SKILL.md +382 -0
- package/.mindforge/skills/github-pr-workflow/SKILL.md +379 -0
- package/.mindforge/skills/jupyter-live-kernel/SKILL.md +179 -0
- package/.mindforge/skills/kanban-orchestrator/SKILL.md +227 -0
- package/.mindforge/skills/kanban-worker/SKILL.md +206 -0
- package/.mindforge/skills/meme-generation/SKILL.md +141 -0
- package/.mindforge/skills/obsidian/SKILL.md +80 -0
- package/.mindforge/skills/osint-investigation/SKILL.md +288 -0
- package/.mindforge/skills/oss-forensics/SKILL.md +421 -0
- package/.mindforge/skills/pixel-art/SKILL.md +228 -0
- package/.mindforge/skills/plan/SKILL.md +350 -0
- package/.mindforge/skills/requesting-code-review/SKILL.md +292 -0
- package/.mindforge/skills/research-paper-writing/SKILL.md +2384 -0
- package/.mindforge/skills/scrapling/SKILL.md +345 -0
- package/.mindforge/skills/sherlock/SKILL.md +203 -0
- package/.mindforge/skills/simplify-code/SKILL.md +187 -0
- package/.mindforge/skills/spike/SKILL.md +209 -0
- package/.mindforge/skills/subagent-driven-development/SKILL.md +364 -0
- package/.mindforge/skills/systematic-debugging/SKILL.md +379 -0
- package/.mindforge/skills/test-driven-development/SKILL.md +355 -0
- package/.mindforge/skills/web-pentest/SKILL.md +327 -0
- package/CHANGELOG.md +43 -0
- package/MINDFORGE.md +2 -2
- package/README.md +39 -3
- package/RELEASENOTES.md +55 -0
- package/docs/getting-started.md +42 -5
- package/package.json +1 -1
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hyperframes
|
|
3
|
+
description: Create HTML-based video compositions, animated title cards, social overlays, captioned talking-head videos, audio-reactive visuals, and shader transitions using HyperFrames. HTML is the source of truth for video. Use when the user wants a rendered MP4/WebM from an HTML composition, wants to animate text/logos/charts over media, needs captions synced to audio, wants TTS narration, or wants to convert a website into a video.
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
prerequisites:
|
|
6
|
+
commands: [node, ffmpeg, npx]
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# HyperFrames
|
|
10
|
+
|
|
11
|
+
HTML is the source of truth for video. A composition is an HTML file with `data-*` attributes for timing, a GSAP timeline for animation, and CSS for appearance. The HyperFrames engine captures the page frame-by-frame and encodes to MP4/WebM with FFmpeg.
|
|
12
|
+
|
|
13
|
+
**Complement to `manim-video`:** Use `manim-video` for mathematical/geometric explainers (equations, 3B1B-style). Use `hyperframes` for motion-graphics, talking-head with captions, product tours, social overlays, shader transitions, and anything driven by real video/audio media.
|
|
14
|
+
|
|
15
|
+
## When to Use
|
|
16
|
+
|
|
17
|
+
- User asks for a rendered video from text, a script, or a website
|
|
18
|
+
- Animated title cards, lower thirds, or typographic intros
|
|
19
|
+
- Captioned narration video (TTS + captions synced to waveform)
|
|
20
|
+
- Audio-reactive visuals (beat sync, spectrum bars, pulsing glow)
|
|
21
|
+
- Scene-to-scene transitions (crossfade, wipe, shader warp, flash-through-white)
|
|
22
|
+
- Social overlays (Instagram/TikTok/YouTube style)
|
|
23
|
+
- Website-to-video pipeline (capture a URL, produce a promo)
|
|
24
|
+
- Any HTML/CSS/JS animation that must render deterministically to a video file
|
|
25
|
+
|
|
26
|
+
Do **not** use this skill for:
|
|
27
|
+
- Pure math/equation animation (→ `manim-video`)
|
|
28
|
+
- Image generation or memes (→ `meme-generation`, image models)
|
|
29
|
+
- Live video conferencing or streaming
|
|
30
|
+
|
|
31
|
+
## Quick Reference
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx hyperframes init my-video # scaffold a project
|
|
35
|
+
cd my-video
|
|
36
|
+
npx hyperframes lint # validate before preview/render
|
|
37
|
+
npx hyperframes preview # live-reload browser preview (port 3002)
|
|
38
|
+
npx hyperframes render --output final.mp4 # render to MP4
|
|
39
|
+
npx hyperframes doctor # diagnose environment issues
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Render flags: `--quality draft|standard|high` · `--fps 24|30|60` · `--format mp4|webm` · `--docker` (reproducible) · `--strict`.
|
|
43
|
+
|
|
44
|
+
Full CLI reference: [references/cli.md](references/cli.md).
|
|
45
|
+
|
|
46
|
+
## Setup (one-time)
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
bash "$(dirname "$(find ~/.agent/skills -path '*/hyperframes/SKILL.md' 2>/dev/null | head -1)")/scripts/setup.sh"
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
The script:
|
|
53
|
+
1. Verifies Node.js >= 22 and FFmpeg are installed (prints fix instructions if not).
|
|
54
|
+
2. Installs the `hyperframes` CLI globally (`npm install -g hyperframes@>=0.4.2`).
|
|
55
|
+
3. Pre-caches `chrome-headless-shell` via Puppeteer — **required** for best-quality rendering via Chrome's `HeadlessExperimental.beginFrame` capture path.
|
|
56
|
+
4. Runs `npx hyperframes doctor` and reports the result.
|
|
57
|
+
|
|
58
|
+
See [references/troubleshooting.md](references/troubleshooting.md) if setup fails.
|
|
59
|
+
|
|
60
|
+
## Procedure
|
|
61
|
+
|
|
62
|
+
### 1. Plan before writing HTML
|
|
63
|
+
|
|
64
|
+
Before touching code, articulate at a high level:
|
|
65
|
+
- **What** — narrative arc, key moments, emotional beats
|
|
66
|
+
- **Structure** — compositions, tracks (video/audio/overlays), durations
|
|
67
|
+
- **Visual identity** — colors, fonts, motion character (explosive / cinematic / fluid / technical)
|
|
68
|
+
- **Hero frame** — for each scene, the moment when the most elements are simultaneously visible. This is the static layout you'll build first.
|
|
69
|
+
|
|
70
|
+
**Visual Identity Gate (HARD-GATE).** Before writing ANY composition HTML, a visual identity must be defined. Do NOT write compositions with default or generic colors (`#333`, `#3b82f6`, `Roboto` are tells that this step was skipped). Check in order:
|
|
71
|
+
|
|
72
|
+
1. **`DESIGN.md` at project root?** → Use its exact colors, fonts, motion rules, and "What NOT to Do" constraints.
|
|
73
|
+
2. **User named a style** (e.g. "Swiss Pulse", "dark and techy", "luxury brand")? → Generate a minimal `DESIGN.md` with `## Style Prompt`, `## Colors` (3-5 hex with roles), `## Typography` (1-2 families), `## What NOT to Do` (3-5 anti-patterns).
|
|
74
|
+
3. **None of the above?** → Ask 3 questions before writing any HTML:
|
|
75
|
+
- Mood? (explosive / cinematic / fluid / technical / chaotic / warm)
|
|
76
|
+
- Light or dark canvas?
|
|
77
|
+
- Any brand colors, fonts, or visual references?
|
|
78
|
+
|
|
79
|
+
Then generate a `DESIGN.md` from the answers. Every composition must trace its palette and typography back to `DESIGN.md` or explicit user direction.
|
|
80
|
+
|
|
81
|
+
### 2. Scaffold
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
npx hyperframes init my-video --non-interactive
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Templates: `blank`, `warm-grain`, `play-mode`, `swiss-grid`, `vignelli`, `decision-tree`, `kinetic-type`, `product-promo`, `nyt-graph`. Pass `--example <name>` to pick one, `--video clip.mp4` or `--audio track.mp3` to seed with media.
|
|
88
|
+
|
|
89
|
+
### 3. Layout before animation
|
|
90
|
+
|
|
91
|
+
Write the static HTML+CSS for the **hero frame first** — no GSAP yet. The `.scene-content` container must fill the scene (`width:100%; height:100%; padding:Npx`) with `display:flex` + `gap`. Use padding to push content inward — never `position: absolute; top: Npx` on a content container (content overflows when taller than the remaining space).
|
|
92
|
+
|
|
93
|
+
Only after the hero frame looks right, add `gsap.from()` entrances (animate **to** the CSS position) and `gsap.to()` exits (animate **from** it).
|
|
94
|
+
|
|
95
|
+
See [references/composition.md](references/composition.md) for the full data-attribute schema and composition rules.
|
|
96
|
+
|
|
97
|
+
### 4. Animate with GSAP
|
|
98
|
+
|
|
99
|
+
Every composition must:
|
|
100
|
+
- Register its timeline: `window.__timelines["<composition-id>"] = tl`
|
|
101
|
+
- Start paused: `gsap.timeline({ paused: true })` — the player controls playback
|
|
102
|
+
- Use finite `repeat` values (no `repeat: -1` — breaks the capture engine). Calculate: `repeat: Math.ceil(duration / cycleDuration) - 1`.
|
|
103
|
+
- Be deterministic — no `Math.random()`, `Date.now()`, or wall-clock logic. Use a seeded PRNG if you need pseudo-randomness.
|
|
104
|
+
- Build synchronously — no `async`/`await`, `setTimeout`, or Promises around timeline construction.
|
|
105
|
+
|
|
106
|
+
See [references/gsap.md](references/gsap.md) for the core GSAP API (tweens, eases, stagger, timelines).
|
|
107
|
+
|
|
108
|
+
### 5. Transitions between scenes
|
|
109
|
+
|
|
110
|
+
Multi-scene compositions require transitions. Rules:
|
|
111
|
+
1. **Always use a transition between scenes** — no jump cuts.
|
|
112
|
+
2. **Always use entrance animations** on every scene element (`gsap.from(...)`).
|
|
113
|
+
3. **Never use exit animations** except on the final scene — the transition IS the exit.
|
|
114
|
+
4. The final scene may fade out.
|
|
115
|
+
|
|
116
|
+
Use `npx hyperframes add <transition-name>` to install shader transitions (`flash-through-white`, `liquid-wipe`, etc.). Full list: `npx hyperframes add --list`.
|
|
117
|
+
|
|
118
|
+
### 6. Audio, captions, TTS, audio-reactive, highlighting
|
|
119
|
+
|
|
120
|
+
- **Audio:** always a separate `<audio>` element (video is `muted playsinline`).
|
|
121
|
+
- **TTS:** `npx hyperframes tts "Script text" --voice af_nova --output narration.wav`. List voices with `--list`. Voice ID first letter encodes language (`a`/`b`=English, `e`=Spanish, `f`=French, `j`=Japanese, `z`=Mandarin, etc.) — the CLI auto-infers the phonemizer locale; pass `--lang` only to override. Non-English phonemization requires `espeak-ng` installed system-wide.
|
|
122
|
+
- **Captions:** `npx hyperframes transcribe narration.wav` → word-level transcript. Pick style from the transcript tone (hype / corporate / tutorial / storytelling / social — see the table in `references/features.md`). **Language rule:** never use `.en` whisper models unless the audio is confirmed English — `.en` translates non-English audio instead of transcribing it. Every caption group MUST have a hard `tl.set(el, { opacity: 0, visibility: "hidden" }, group.end)` kill after its exit tween — otherwise groups leak visible into later ones.
|
|
123
|
+
- **Audio-reactive visuals:** pre-extract audio bands (bass / mid / treble) and sample per-frame inside the timeline with a `for` loop of `tl.call(draw, [], f / fps)` — a single long tween does NOT react to audio. Map bass → `scale` (pulse), treble → `textShadow`/`boxShadow` (glow), overall amplitude → `opacity`/`y`/`backgroundColor`. Avoid equalizer-bar clichés — let content guide the visual, audio drive its behavior.
|
|
124
|
+
- **Marker-style highlighting:** highlight, circle, burst, scribble, sketchout effects for text emphasis are deterministic CSS+GSAP — see `references/features.md#marker-highlighting`. Fully seekable, no animated SVG filters.
|
|
125
|
+
- **Scene transitions:** every multi-scene composition MUST use transitions (no jump cuts). Pick from CSS primitives (push slide, blur crossfade, zoom through, staggered blocks) or shader transitions (`flash-through-white`, `liquid-wipe`, `cross-warp-morph`, `chromatic-split`, etc.) via `npx hyperframes add`. Mood and energy tables live in `references/features.md#transitions`. Do not mix CSS and shader transitions in the same composition.
|
|
126
|
+
|
|
127
|
+
### 7. Lint, validate, inspect, preview, render
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
npx hyperframes lint # catches missing data-composition-id, overlapping tracks, unregistered timelines
|
|
131
|
+
npx hyperframes validate # WCAG contrast audit at 5 timestamps
|
|
132
|
+
npx hyperframes inspect # visual layout audit — overflow, off-frame elements, occluded text
|
|
133
|
+
npx hyperframes preview # live browser preview
|
|
134
|
+
npx hyperframes render --quality draft --output draft.mp4 # fast iteration
|
|
135
|
+
npx hyperframes render --quality high --output final.mp4 # final delivery
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
`hyperframes validate` samples background pixels behind every text element and warns on contrast ratios below 4.5:1 (or 3:1 for large text). `hyperframes inspect` is the layout-side companion — runs the page at multiple timestamps and flags issues that a static lint can't see (a caption that wraps past the safe area only at 4.5s, a card that overflows when its title is the longest variant, an element that ends up behind a transition shader). Run `inspect` especially on compositions with speech bubbles, cards, captions, or tight typography.
|
|
139
|
+
|
|
140
|
+
### 8. Website-to-video (if the user gives a URL)
|
|
141
|
+
|
|
142
|
+
Use the 7-step capture-to-video workflow in [references/website-to-video.md](references/website-to-video.md): capture → DESIGN.md → SCRIPT.md → storyboard → composition → render → deliver.
|
|
143
|
+
|
|
144
|
+
## Pitfalls
|
|
145
|
+
|
|
146
|
+
- **`HeadlessExperimental.beginFrame' wasn't found`** — Chromium 147+ removed this protocol. Ensure you're on `hyperframes@>=0.4.2` (auto-detects and falls back to screenshot mode). Escape hatch: `export PRODUCER_FORCE_SCREENSHOT=true`. See [hyperframes#294](https://github.com/heygen-com/hyperframes/issues/294) and [references/troubleshooting.md](references/troubleshooting.md).
|
|
147
|
+
- **System Chrome (not `chrome-headless-shell`)** — renders hang for 120s then timeout. Run `npx puppeteer browsers install chrome-headless-shell` (setup.sh does this). `hyperframes doctor` reports which binary will be used.
|
|
148
|
+
- **`repeat: -1` anywhere** — breaks the capture engine. Always compute a finite repeat count.
|
|
149
|
+
- **`gsap.set()` on clip elements that enter later** — the element doesn't exist at page load. Use `tl.set(selector, vars, timePosition)` inside the timeline instead, at or after the clip's `data-start`.
|
|
150
|
+
- **`<br>` inside content text** — forced breaks don't know the rendered font width, so natural wrap + `<br>` double-breaks. Use `max-width` to let text wrap. Exception: short display titles where each word is deliberately on its own line.
|
|
151
|
+
- **Animating `visibility` or `display`** — GSAP can't tween these. Use `autoAlpha` (handles both visibility and opacity).
|
|
152
|
+
- **Calling `video.play()` or `audio.play()`** — the framework owns playback. Never call these yourself.
|
|
153
|
+
- **Building timelines async** — the capture engine reads `window.__timelines` synchronously after page load. Never wrap timeline construction in `async`, `setTimeout`, or a Promise.
|
|
154
|
+
- **Standalone `index.html` wrapped in `<template>`** — hides all content from the browser. Only **sub-compositions** loaded via `data-composition-src` use `<template>`.
|
|
155
|
+
- **Using video for audio** — always muted `<video>` + separate `<audio>`.
|
|
156
|
+
|
|
157
|
+
## Verification
|
|
158
|
+
|
|
159
|
+
Before and after rendering:
|
|
160
|
+
|
|
161
|
+
1. **Lint + validate + inspect pass:** `npx hyperframes lint --strict && npx hyperframes validate && npx hyperframes inspect` (lint catches structural issues, validate catches contrast, inspect catches visual layout / overflow issues — see troubleshooting.md if warnings appear).
|
|
162
|
+
2. **Animation choreography** — for new compositions or significant animation changes, run the animation map. `npx hyperframes init` copies the skill scripts into the project, so the path is project-local:
|
|
163
|
+
```bash
|
|
164
|
+
node skills/hyperframes/scripts/animation-map.mjs <composition-dir> \
|
|
165
|
+
--out <composition-dir>/.hyperframes/anim-map
|
|
166
|
+
```
|
|
167
|
+
Outputs a single `animation-map.json` with per-tween summaries, ASCII Gantt timeline, stagger detection, dead zones (>1s with no animation), element lifecycles, and flags (`offscreen`, `collision`, `invisible`, `paced-fast` <0.2s, `paced-slow` >2s). Scan summaries and flags — fix or justify each. Skip on small edits.
|
|
168
|
+
3. **File exists + non-zero:** `ls -lh final.mp4`.
|
|
169
|
+
4. **Duration matches `data-duration`:** `ffprobe -v error -show_entries format=duration -of default=nw=1:nk=1 final.mp4`.
|
|
170
|
+
5. **Visual check:** extract a mid-composition frame: `ffmpeg -i final.mp4 -ss 00:00:05 -vframes 1 preview.png`.
|
|
171
|
+
6. **Audio present if expected:** `ffprobe -v error -show_streams -select_streams a -of default=nw=1:nk=1 final.mp4 | head -1`.
|
|
172
|
+
|
|
173
|
+
If `hyperframes render` fails, run `npx hyperframes doctor` and attach its output when reporting.
|
|
174
|
+
|
|
175
|
+
## References
|
|
176
|
+
|
|
177
|
+
- [composition.md](references/composition.md) — data attributes, timeline contract, non-negotiable rules, typography/asset rules
|
|
178
|
+
- [cli.md](references/cli.md) — every CLI command (init, capture, lint, validate, inspect, preview, render, transcribe, tts, doctor, browser, info, upgrade, benchmark)
|
|
179
|
+
- [gsap.md](references/gsap.md) — GSAP core API for HyperFrames (tweens, eases, stagger, timelines, matchMedia)
|
|
180
|
+
- [features.md](references/features.md) — captions, TTS, audio-reactive, marker highlighting, transitions (load on demand)
|
|
181
|
+
- [website-to-video.md](references/website-to-video.md) — 7-step capture-to-video workflow
|
|
182
|
+
- [troubleshooting.md](references/troubleshooting.md) — OpenClaw fix, env vars, common render errors
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
# HyperFrames CLI
|
|
2
|
+
|
|
3
|
+
Everything runs through `npx hyperframes` (or the globally-installed `hyperframes` after `npm install -g hyperframes`). Requires Node.js >= 22 and FFmpeg.
|
|
4
|
+
|
|
5
|
+
## Workflow
|
|
6
|
+
|
|
7
|
+
1. **Scaffold** — `npx hyperframes init my-video` (or `npx hyperframes capture <url>` if starting from a website)
|
|
8
|
+
2. **Write** — author HTML composition (see `composition.md`)
|
|
9
|
+
3. **Lint** — `npx hyperframes lint`
|
|
10
|
+
4. **Validate** — `npx hyperframes validate` (WCAG contrast audit)
|
|
11
|
+
5. **Inspect** — `npx hyperframes inspect` (visual layout audit)
|
|
12
|
+
6. **Preview** — `npx hyperframes preview`
|
|
13
|
+
7. **Render** — `npx hyperframes render`
|
|
14
|
+
|
|
15
|
+
Always lint before preview/render — catches missing `data-composition-id`, overlapping tracks, and unregistered timelines.
|
|
16
|
+
|
|
17
|
+
## init — Scaffold a Project
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx hyperframes init my-video # interactive wizard
|
|
21
|
+
npx hyperframes init my-video --example warm-grain # pick an example template
|
|
22
|
+
npx hyperframes init my-video --video clip.mp4 # seed with a video file
|
|
23
|
+
npx hyperframes init my-video --audio track.mp3 # seed with an audio file
|
|
24
|
+
npx hyperframes init my-video --non-interactive # skip prompts (CI / agent use)
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Templates: `blank`, `warm-grain`, `play-mode`, `swiss-grid`, `vignelli`, `decision-tree`, `kinetic-type`, `product-promo`, `nyt-graph`.
|
|
28
|
+
|
|
29
|
+
`init` creates the correct file structure, copies media, transcribes audio with Whisper, and installs authoring skills. Use it instead of creating files by hand.
|
|
30
|
+
|
|
31
|
+
## capture — Website → Editable Components
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
npx hyperframes capture https://example.com # → captures/example.com/
|
|
35
|
+
npx hyperframes capture https://stripe.com -o stripe-video # custom output dir
|
|
36
|
+
npx hyperframes capture https://example.com --json # machine-readable output
|
|
37
|
+
npx hyperframes capture https://example.com --skip-assets # skip images/SVGs
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Captures the site into `captures/<hostname>/capture/` by default, producing `capture/screenshots/`, `capture/assets/`, `capture/extracted/` (tokens.json, visible-text.txt, fonts.json), and a self-contained snapshot.
|
|
41
|
+
|
|
42
|
+
All downstream steps (DESIGN.md, SCRIPT.md, STORYBOARD, composition) read from the `capture/` subfolder — see `website-to-video.md`.
|
|
43
|
+
|
|
44
|
+
## lint
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
npx hyperframes lint # current directory
|
|
48
|
+
npx hyperframes lint ./my-project # specific project
|
|
49
|
+
npx hyperframes lint --verbose # include info-level findings
|
|
50
|
+
npx hyperframes lint --json # machine-readable output
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Lints `index.html` and all files in `compositions/`. Reports errors (must fix), warnings (should fix), and info (only with `--verbose`).
|
|
54
|
+
|
|
55
|
+
## validate
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npx hyperframes validate # WCAG contrast audit at 5 timestamps
|
|
59
|
+
npx hyperframes validate --no-contrast # skip while iterating
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Seeks to 5 timestamps, screenshots the page, samples background pixels behind every text element, and warns on contrast ratios below 4.5:1 (normal text) or 3:1 (large text — 24px+, or 19px+ bold). Run before final render.
|
|
63
|
+
|
|
64
|
+
## inspect
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npx hyperframes inspect # visual layout audit at 5 timestamps
|
|
68
|
+
npx hyperframes inspect ./my-project # specific project
|
|
69
|
+
npx hyperframes inspect --json # agent-readable findings
|
|
70
|
+
npx hyperframes inspect --samples 15 # denser timeline sweep
|
|
71
|
+
npx hyperframes inspect --at 1.5,4,7.25 # explicit hero-frame timestamps
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
Use this after `lint` and `validate`, especially for compositions with speech bubbles, cards, captions, or tight typography. Reports overflow, off-frame elements, occluded text, contrast warnings, and per-timestamp layout summaries — catches issues that pure timeline lint can't see (e.g., a caption that wraps past the safe area only at a specific timestamp).
|
|
75
|
+
|
|
76
|
+
`npx hyperframes layout` is a compatibility alias for the same visual inspection pass.
|
|
77
|
+
|
|
78
|
+
## preview
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
npx hyperframes preview # serve current directory (port 3002)
|
|
82
|
+
npx hyperframes preview --port 4567 # custom port
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Hot-reloads on file changes. Opens the Studio in your browser automatically.
|
|
86
|
+
|
|
87
|
+
## render
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
npx hyperframes render # standard MP4
|
|
91
|
+
npx hyperframes render --output final.mp4 # named output
|
|
92
|
+
npx hyperframes render --quality draft # fast iteration
|
|
93
|
+
npx hyperframes render --fps 60 --quality high # final delivery
|
|
94
|
+
npx hyperframes render --format webm # transparent WebM
|
|
95
|
+
npx hyperframes render --docker # byte-identical reproducible render
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
| Flag | Options | Default | Notes |
|
|
99
|
+
| -------------- | ----------------------- | ------------------------------ | --------------------------- |
|
|
100
|
+
| `--output` | path | `renders/<name>_<timestamp>.mp4` | Output path |
|
|
101
|
+
| `--fps` | 24, 30, 60 | 30 | 60fps doubles render time |
|
|
102
|
+
| `--quality` | `draft`, `standard`, `high` | standard | draft for iterating |
|
|
103
|
+
| `--format` | `mp4`, `webm` | mp4 | WebM supports transparency |
|
|
104
|
+
| `--workers` | 1–8 or `auto` | auto | Each spawns Chrome |
|
|
105
|
+
| `--docker` | flag | off | Reproducible output |
|
|
106
|
+
| `--gpu` | flag | off | GPU-accelerated encoding |
|
|
107
|
+
| `--strict` | flag | off | Fail on lint errors |
|
|
108
|
+
| `--strict-all` | flag | off | Fail on errors AND warnings |
|
|
109
|
+
|
|
110
|
+
**Quality guidance:** `draft` while iterating, `standard` for review, `high` for final delivery.
|
|
111
|
+
|
|
112
|
+
## transcribe
|
|
113
|
+
|
|
114
|
+
```bash
|
|
115
|
+
npx hyperframes transcribe audio.mp3
|
|
116
|
+
npx hyperframes transcribe video.mp4 --model medium.en --language en
|
|
117
|
+
npx hyperframes transcribe subtitles.srt # import existing
|
|
118
|
+
npx hyperframes transcribe subtitles.vtt
|
|
119
|
+
npx hyperframes transcribe openai-response.json
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Produces word-level timings suitable for caption components. First run downloads the Whisper model (cached after).
|
|
123
|
+
|
|
124
|
+
## tts
|
|
125
|
+
|
|
126
|
+
```bash
|
|
127
|
+
npx hyperframes tts "Text here" --voice af_nova --output narration.wav
|
|
128
|
+
npx hyperframes tts script.txt --voice bf_emma
|
|
129
|
+
npx hyperframes tts "La reunión empieza a las nueve" --voice ef_dora --output es.wav
|
|
130
|
+
npx hyperframes tts "Hello there" --voice af_heart --lang fr-fr --output accented.wav
|
|
131
|
+
npx hyperframes tts --list # show all voices
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Uses Kokoro (local, no API key). Voice ID first letter encodes language: `a` American English, `b` British English, `e` Spanish, `f` French, `h` Hindi, `i` Italian, `j` Japanese, `p` Brazilian Portuguese, `z` Mandarin. The CLI auto-infers the phonemizer locale from that prefix — pass `--lang` only to override (e.g. stylized accents). Valid `--lang` codes: `en-us`, `en-gb`, `es`, `fr-fr`, `hi`, `it`, `pt-br`, `ja`, `zh`. Non-English phonemization requires `espeak-ng` installed system-wide (`apt-get install espeak-ng` / `brew install espeak-ng`).
|
|
135
|
+
|
|
136
|
+
## doctor
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
npx hyperframes doctor
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Verifies environment:
|
|
143
|
+
- Node.js >= 22
|
|
144
|
+
- FFmpeg present on PATH
|
|
145
|
+
- Available RAM (renders are memory-hungry — 4 GB minimum)
|
|
146
|
+
- Chrome binary resolution (`chrome-headless-shell` preferred over system Chrome)
|
|
147
|
+
- Current `hyperframes` version
|
|
148
|
+
|
|
149
|
+
Run this **first** when a render fails. See `troubleshooting.md` for interpreting the output.
|
|
150
|
+
|
|
151
|
+
## browser
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
npx hyperframes browser --install # install the bundled chrome-headless-shell
|
|
155
|
+
npx hyperframes browser --path # print the resolved browser binary path
|
|
156
|
+
npx hyperframes browser --clean # clear the bundled browser cache
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
## info
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
npx hyperframes info
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Prints version, Node version, FFmpeg version, OS, and resolved browser path — useful in bug reports.
|
|
166
|
+
|
|
167
|
+
## upgrade
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
npx hyperframes upgrade -y
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Check for and install updates. Run this if you hit `HeadlessExperimental.beginFrame` errors — the auto-detect fix shipped in `hyperframes@0.4.2` (commit 4c72ba4, March 2026).
|
|
174
|
+
|
|
175
|
+
## Other
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
npx hyperframes compositions # list compositions in the project
|
|
179
|
+
npx hyperframes docs # open documentation in browser
|
|
180
|
+
npx hyperframes benchmark . # benchmark render performance
|
|
181
|
+
npx hyperframes add <block> # install a block/component from the catalog
|
|
182
|
+
npx hyperframes add --list # browse the catalog
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Popular catalog blocks: `flash-through-white` (shader transition), `instagram-follow` (social overlay), `data-chart` (animated chart), `lower-third` (talking-head overlay). See [hyperframes.heygen.com/catalog](https://hyperframes.heygen.com/catalog).
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Composition Authoring
|
|
2
|
+
|
|
3
|
+
HTML structure, data attributes, timeline contract, and non-negotiable rules.
|
|
4
|
+
|
|
5
|
+
## Root Structure
|
|
6
|
+
|
|
7
|
+
Standalone `index.html` — the top-level composition. **Does NOT use `<template>`**. Put the `data-composition-id` div directly in `<body>`.
|
|
8
|
+
|
|
9
|
+
```html
|
|
10
|
+
<!doctype html>
|
|
11
|
+
<html>
|
|
12
|
+
<body>
|
|
13
|
+
<div
|
|
14
|
+
id="stage"
|
|
15
|
+
data-composition-id="root"
|
|
16
|
+
data-start="0"
|
|
17
|
+
data-duration="10"
|
|
18
|
+
data-width="1920"
|
|
19
|
+
data-height="1080"
|
|
20
|
+
>
|
|
21
|
+
<!-- clips go here -->
|
|
22
|
+
<video id="clip-1" data-start="0" data-duration="5" data-track-index="0" src="intro.mp4" muted playsinline></video>
|
|
23
|
+
<img id="logo" data-start="2" data-duration="3" data-track-index="1" src="logo.png" />
|
|
24
|
+
<audio id="music" data-start="0" data-duration="10" data-track-index="2" data-volume="0.5" src="music.wav"></audio>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/gsap.min.js"></script>
|
|
28
|
+
<script>
|
|
29
|
+
window.__timelines = window.__timelines || {};
|
|
30
|
+
const tl = gsap.timeline({ paused: true });
|
|
31
|
+
tl.from("#logo", { opacity: 0, y: 40, duration: 0.6 }, 2);
|
|
32
|
+
window.__timelines["root"] = tl;
|
|
33
|
+
</script>
|
|
34
|
+
</body>
|
|
35
|
+
</html>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Sub-compositions loaded via `data-composition-src` **DO** use `<template>`:
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<template id="my-comp-template">
|
|
42
|
+
<div data-composition-id="my-comp" data-width="1920" data-height="1080">
|
|
43
|
+
<!-- content + scoped <style> + <script> with window.__timelines["my-comp"] -->
|
|
44
|
+
</div>
|
|
45
|
+
</template>
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Load from the root: `<div id="el-1" data-composition-id="my-comp" data-composition-src="compositions/my-comp.html" data-start="0" data-duration="10" data-track-index="1"></div>`
|
|
49
|
+
|
|
50
|
+
## Data Attributes
|
|
51
|
+
|
|
52
|
+
### All clips
|
|
53
|
+
|
|
54
|
+
| Attribute | Required | Values |
|
|
55
|
+
| ------------------ | --------------------------------- | ------------------------------------------------------ |
|
|
56
|
+
| `id` | Yes | Unique identifier |
|
|
57
|
+
| `data-start` | Yes | Seconds, or clip ID reference (`"el-1"`, `"intro + 2"`) |
|
|
58
|
+
| `data-duration` | Required for img/div/compositions | Seconds. Video/audio defaults to media duration. |
|
|
59
|
+
| `data-track-index` | Yes | Integer. Same-track clips cannot overlap. |
|
|
60
|
+
| `data-media-start` | No | Trim offset into source (seconds) |
|
|
61
|
+
| `data-volume` | No | 0–1 (default 1) |
|
|
62
|
+
|
|
63
|
+
`data-track-index` controls timeline layout only — **not** visual layering. Use CSS `z-index` for layering.
|
|
64
|
+
|
|
65
|
+
### Composition clips
|
|
66
|
+
|
|
67
|
+
| Attribute | Required | Values |
|
|
68
|
+
| ---------------------------- | -------- | -------------------------------------------- |
|
|
69
|
+
| `data-composition-id` | Yes | Unique composition ID |
|
|
70
|
+
| `data-start` | Yes | Start time (root composition: `"0"`) |
|
|
71
|
+
| `data-duration` | Yes | Takes precedence over GSAP timeline duration |
|
|
72
|
+
| `data-width` / `data-height` | Yes | Pixel dimensions (1920x1080 or 1080x1920) |
|
|
73
|
+
| `data-composition-src` | No | Path to external HTML file |
|
|
74
|
+
|
|
75
|
+
## Timeline Contract
|
|
76
|
+
|
|
77
|
+
- Every timeline starts `{ paused: true }` — the player controls playback.
|
|
78
|
+
- Register every timeline: `window.__timelines["<composition-id>"] = tl`.
|
|
79
|
+
- Duration comes from `data-duration`, not from the GSAP timeline length.
|
|
80
|
+
- Framework auto-nests sub-timelines — do NOT manually add them.
|
|
81
|
+
- Never create empty tweens just to set duration.
|
|
82
|
+
|
|
83
|
+
## Non-Negotiable Rules
|
|
84
|
+
|
|
85
|
+
1. **Deterministic.** No `Math.random()`, `Date.now()`, or time-based logic. Use a seeded PRNG (e.g. mulberry32) if you need pseudo-randomness.
|
|
86
|
+
2. **GSAP only on visual properties.** `opacity`, `x`, `y`, `scale`, `rotation`, `color`, `backgroundColor`, `borderRadius`, transforms. Never animate `visibility`, `display`, or call `video.play()`/`audio.play()`.
|
|
87
|
+
3. **No property conflicts across timelines.** Never animate the same property on the same element from multiple timelines simultaneously.
|
|
88
|
+
4. **No `repeat: -1`.** Infinite-repeat tweens break the capture engine. Compute `repeat: Math.ceil(duration / cycleDuration) - 1`.
|
|
89
|
+
5. **Synchronous timeline construction.** Never build timelines inside `async`/`await`, `setTimeout`, or Promises. The capture engine reads `window.__timelines` synchronously after page load. Fonts are embedded by the compiler — no need to wait for load.
|
|
90
|
+
6. **Root composition has no `<template>` wrapper.** Only sub-compositions use `<template>`.
|
|
91
|
+
7. **Video is always `muted playsinline`.** Audio is always a separate `<audio>` element — even if it's the same source file.
|
|
92
|
+
8. **Content containers use padding, not absolute positioning.** `.scene-content { width: 100%; height: 100%; padding: Npx; display: flex; flex-direction: column; gap: Npx; box-sizing: border-box }`. Absolute-positioned content containers overflow. Reserve `position: absolute` for decoratives only.
|
|
93
|
+
|
|
94
|
+
## Scene Transitions
|
|
95
|
+
|
|
96
|
+
Multi-scene compositions MUST follow all of these:
|
|
97
|
+
|
|
98
|
+
1. **Always use a transition between scenes.** No jump cuts.
|
|
99
|
+
2. **Always use entrance animations** on every scene element. Every element animates IN via `gsap.from(...)`. No element may appear fully-formed.
|
|
100
|
+
3. **Never use exit animations** (except on the final scene). This means NO `gsap.to()` that animates `opacity` to 0, `y` offscreen, etc. The transition IS the exit. Outgoing scene content must be fully visible at the moment the transition starts.
|
|
101
|
+
4. **Final scene only:** may fade elements out. This is the only scene where `gsap.to(..., { opacity: 0 })` is allowed.
|
|
102
|
+
|
|
103
|
+
## Typography and Assets
|
|
104
|
+
|
|
105
|
+
- **Fonts:** write the `font-family` you want in CSS — the compiler embeds supported fonts automatically. Unsupported fonts produce a compiler warning.
|
|
106
|
+
- Add `crossorigin="anonymous"` to external media.
|
|
107
|
+
- For dynamic text sizing, use `window.__hyperframes.fitTextFontSize(text, { maxWidth, fontFamily, fontWeight })`.
|
|
108
|
+
- All project files live at the project root alongside `index.html`. Sub-compositions reference assets with `../`.
|
|
109
|
+
- For rendered video: 60px+ headlines, 20px+ body, 16px+ data labels. `font-variant-numeric: tabular-nums` on number columns. Avoid full-screen linear gradients on dark backgrounds (H.264 banding — use radial or solid + localized glow).
|
|
110
|
+
|
|
111
|
+
## Animation Guardrails
|
|
112
|
+
|
|
113
|
+
- Offset the first animation 0.1–0.3s (not `t=0`).
|
|
114
|
+
- Vary eases across entrance tweens — at least 3 different eases per scene.
|
|
115
|
+
- Don't repeat an entrance pattern within a scene.
|
|
116
|
+
|
|
117
|
+
## Never Do
|
|
118
|
+
|
|
119
|
+
1. Forget `window.__timelines` registration.
|
|
120
|
+
2. Use video for audio — always muted video + separate `<audio>`.
|
|
121
|
+
3. Nest video inside a timed div — use a non-timed wrapper.
|
|
122
|
+
4. Use `data-layer` (use `data-track-index`) or `data-end` (use `data-duration`).
|
|
123
|
+
5. Animate video element dimensions — animate a wrapper div instead.
|
|
124
|
+
6. Call `play`/`pause`/`seek` on media — framework owns playback.
|
|
125
|
+
7. Create a top-level container without `data-composition-id`.
|
|
126
|
+
8. Use `repeat: -1` on any timeline or tween.
|
|
127
|
+
9. Build timelines asynchronously.
|
|
128
|
+
10. Use `gsap.set()` on elements from later scenes — they don't exist in the DOM at page load. Use `tl.set(selector, vars, timePosition)` inside the timeline at or after the clip's `data-start`.
|
|
129
|
+
11. Use `<br>` in content text — causes unwanted extra breaks when the text wraps naturally. Use `max-width` instead. Exception: short display titles (e.g., "THE\nIMMORTAL\nGAME") where each word is deliberately on its own line.
|