Skip to content

Commit 90d9857

Browse files
andyedclaude
andcommitted
feat(demo): add 10s video explainer at top of README
Deterministic HTML+GSAP composition rendered via hyperframes (HeyGen, Apache 2.0) — Puppeteer + FFmpeg pipeline. 1920×1080, 10s, 468KB MP4. Three scenes with crossfade transitions: 1. Title card — "Fisheye·Menu / Fitts's Law, in cascading menus." 2. Menu demo — 6-item cascading menu with a coral cursor; items expand toward the cursor (fisheye behaviour) using the real dark-theme palette from fisheye-menu.css (navy bar, purple hover, silver text). 3. CTA — canonical URL + GitHub attribution. Composition source in demo-video/index.html is reproducible — edit and re-render via `cd demo-video && npx hyperframes render`. DESIGN.md documents the extracted palette and motion rules. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 75f2294 commit 90d9857

8 files changed

Lines changed: 490 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Fisheye Flyout Menu
22

3+
<p align="center">
4+
<video src="demo-video/demo.mp4" width="720" autoplay loop muted playsinline></video>
5+
</p>
6+
37
<img src="logo.svg" width="120" alt="Fisheye Flyout Menu logo" />
48

59
![Fisheye Flyout Menu demo showing Dewey Decimal taxonomy with 600 Technology expanded](screenshot.png)

demo-video/AGENTS.md

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# HyperFrames Composition Project
2+
3+
## Skills
4+
5+
This project uses AI agent skills for framework-specific patterns. Install them if not already present:
6+
7+
```bash
8+
npx skills add heygen-com/hyperframes
9+
```
10+
11+
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.
12+
13+
## Commands
14+
15+
```bash
16+
npx hyperframes preview # preview in browser (studio editor)
17+
npx hyperframes render # render to MP4
18+
npx hyperframes lint # validate compositions (errors + warnings)
19+
npx hyperframes lint --json # machine-readable output for CI
20+
npx hyperframes docs <topic> # reference docs in terminal
21+
```
22+
23+
## Project Structure
24+
25+
- `index.html` — main composition (root timeline)
26+
- `compositions/` — sub-compositions referenced via `data-composition-src`
27+
- `assets/` — media files (video, audio, images)
28+
- `meta.json` — project metadata (id, name)
29+
- `transcript.json` — whisper word-level transcript (if generated)
30+
31+
## Linting — Always Run After Changes
32+
33+
After creating or editing any `.html` composition, run the linter before considering the task complete:
34+
35+
```bash
36+
npx hyperframes lint
37+
```
38+
39+
Fix all errors before presenting the result.
40+
41+
## Key Rules
42+
43+
1. Every timed element needs `data-start`, `data-duration`, and `data-track-index`
44+
2. Visible timed elements **must** have `class="clip"` — the framework uses this for visibility control
45+
3. GSAP timelines must be paused and registered on `window.__timelines`:
46+
```js
47+
window.__timelines = window.__timelines || {};
48+
window.__timelines["composition-id"] = gsap.timeline({ paused: true });
49+
```
50+
4. Videos use `muted` with a separate `<audio>` element for the audio track
51+
5. Sub-compositions use `data-composition-src="compositions/file.html"`
52+
6. Only deterministic logic — no `Date.now()`, no `Math.random()`, no network fetches
53+
54+
## Documentation
55+
56+
Full docs: https://hyperframes.heygen.com/introduction
57+
58+
Machine-readable index for AI tools: https://hyperframes.heygen.com/llms.txt

demo-video/CLAUDE.md

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
# HyperFrames Composition Project
2+
3+
## Skills — USE THESE FIRST
4+
5+
**Always invoke the relevant skill before writing or modifying compositions.** Skills encode framework-specific patterns (e.g., `window.__timelines` registration, `data-*` attribute semantics, shader-compatible CSS rules) that are NOT in generic web docs. Skipping them produces broken compositions.
6+
7+
| Skill | Command | When to use |
8+
| -------------------------- | ------------------------- | ------------------------------------------------------------------------------------------------- |
9+
| **hyperframes** | `/hyperframes` | Creating or editing HTML compositions, captions, TTS, audio-reactive animation, marker highlights |
10+
| **hyperframes-cli** | `/hyperframes-cli` | CLI commands: init, lint, preview, render, transcribe, tts |
11+
| **hyperframes-registry** | `/hyperframes-registry` | Installing blocks and components via `hyperframes add` |
12+
| **website-to-hyperframes** | `/website-to-hyperframes` | Capturing a URL and turning it into a video — full website-to-video pipeline |
13+
| **gsap** | `/gsap` | GSAP animations for HyperFrames — tweens, timelines, easing, performance |
14+
15+
> **Skills not available?** Ask the user to run `npx hyperframes skills` and restart their
16+
> agent session, or install manually: `npx skills add heygen-com/hyperframes`.
17+
18+
## Commands
19+
20+
```bash
21+
npx hyperframes preview # preview in browser (studio editor)
22+
npx hyperframes render # render to MP4
23+
npx hyperframes lint # validate compositions (errors + warnings)
24+
npx hyperframes lint --verbose # include info-level findings
25+
npx hyperframes lint --json # machine-readable output for CI
26+
npx hyperframes docs <topic> # reference docs in terminal
27+
```
28+
29+
## Documentation
30+
31+
**For quick reference**, use the local CLI docs command (no network required):
32+
33+
```bash
34+
npx hyperframes docs <topic>
35+
```
36+
37+
Topics: `data-attributes`, `gsap`, `compositions`, `rendering`, `examples`, `troubleshooting`
38+
39+
**For full documentation**, discover pages via the machine-readable index — do NOT guess URLs:
40+
41+
```
42+
https://hyperframes.heygen.com/llms.txt
43+
```
44+
45+
## Project Structure
46+
47+
- `index.html` — main composition (root timeline)
48+
- `compositions/` — sub-compositions referenced via `data-composition-src`
49+
- `meta.json` — project metadata (id, name)
50+
- `transcript.json` — whisper word-level transcript (if generated)
51+
52+
## Linting — ALWAYS RUN AFTER CHANGES
53+
54+
After creating or editing any `.html` composition, **always** run the linter before considering the task complete:
55+
56+
```bash
57+
npx hyperframes lint
58+
```
59+
60+
Fix all errors before presenting the result. Warnings are informational and usually safe to ignore.
61+
62+
## Key Rules
63+
64+
1. Every timed element needs `data-start`, `data-duration`, and `data-track-index`
65+
2. Elements with timing **MUST** have `class="clip"` — the framework uses this for visibility control
66+
3. Timelines must be paused and registered on `window.__timelines`:
67+
```js
68+
window.__timelines = window.__timelines || {};
69+
window.__timelines["composition-id"] = gsap.timeline({ paused: true });
70+
```
71+
4. Videos use `muted` with a separate `<audio>` element for the audio track
72+
5. Sub-compositions use `data-composition-src="compositions/file.html"` to reference other HTML files
73+
6. Only deterministic logic — no `Date.now()`, no `Math.random()`, no network fetches

demo-video/DESIGN.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# DESIGN — fisheye-menu demo video
2+
3+
## Style Prompt
4+
5+
Technical/editorial register. Dark canvas with navy + purple palette drawn from the fisheye-menu dark theme. Coral accent for focus/cursor, echoing the stylesheet's `--fisheye-focus-ring`. Feels like a precision engineering instrument, not a marketing reel — Fitts's Law is about economical motion, so animation is brisk, efficient, never lingering.
6+
7+
## Colors (from fisheye-menu.css dark theme)
8+
9+
| Token | Hex | Role |
10+
|---|---|---|
11+
| `bg` | `#0a0a1a` | Page background — slightly darker than menu for contrast |
12+
| `menu-bg` | `#16213e` | Menu bar / panel background (`--fisheye-bar-bg`) |
13+
| `menu-border` | `#0f3460` | Borders (`--fisheye-bar-border`) |
14+
| `text-silver` | `#c0c0c0` | Primary text (`--fisheye-bar-text`) |
15+
| `text-cream` | `#e6e4d2` | Display / hero text (higher contrast) |
16+
| `hover-purple` | `#533483` | Item hover / expanded state (`--fisheye-item-hover-bg`) |
17+
| `focus-coral` | `#ff9595` | Cursor, focus ring, accent highlights (`--fisheye-focus-ring`) |
18+
19+
## Typography
20+
21+
- Inter, weights 400 / 500 / 700 / 800
22+
- Title (hero): 140px / 800 / letter-spacing -0.03em
23+
- Subtitle: 42px / 400
24+
- Caption: 32px / 500
25+
- URL hero: 64px / 700
26+
27+
## Motion rules
28+
29+
- Eases: `power3.out` for hero entrances, `power2.out` for body elements, `back.out(1.8)` for playful accents, `expo.out` for container emergence. Exits use `power2.in`.
30+
- Scene 2 menu expansion is the signature motion — items animate at `power2.out` over 400ms (quick arrival, settle immediately). Mirrors the real CSS transition (80ms in the live demo, scaled up for video readability).
31+
- Cursor moves with `power2.inOut` — deliberate, not linear. Real mice accelerate and decelerate.
32+
33+
## What NOT to Do
34+
35+
- No rainbow / jet colormaps — palette is navy + purple + coral only.
36+
- No bouncy / springy eases on the menu items themselves — defeats the Fitts's Law precision vibe.
37+
- No hand-drawn / sketchy textures — this is precision engineering, not whimsy.
38+
- No centered body text paragraphs (universal muriel rule).
39+
- No accent lines under titles (AI-deck tell).
40+
- No music — silent video. The README embed plays muted by default and sound would feel promotional.

demo-video/demo.mp4

468 KB
Binary file not shown.

demo-video/hyperframes.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "https://hyperframes.heygen.com/schema/hyperframes.json",
3+
"registry": "https://raw.githubusercontent.com/heygen-com/hyperframes/main/registry",
4+
"paths": {
5+
"blocks": "compositions",
6+
"components": "compositions/components",
7+
"assets": "assets"
8+
}
9+
}

0 commit comments

Comments
 (0)