hyperframes 0.6.96 → 0.6.98

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.
Files changed (77) hide show
  1. package/dist/beat-analyzer.global.js +326 -0
  2. package/dist/cli.js +3058 -1947
  3. package/dist/commands/layout-audit.browser.js +86 -0
  4. package/dist/hyperframe-runtime.js +20 -20
  5. package/dist/hyperframe.manifest.json +1 -1
  6. package/dist/hyperframe.runtime.iife.js +20 -20
  7. package/dist/skills/hyperframes-cli/SKILL.md +67 -103
  8. package/dist/skills/hyperframes-cli/references/doctor-browser.md +45 -0
  9. package/dist/skills/hyperframes-cli/references/init-and-scaffold.md +51 -0
  10. package/dist/skills/hyperframes-cli/references/lambda.md +132 -0
  11. package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +93 -0
  12. package/dist/skills/hyperframes-cli/references/preview-render.md +107 -0
  13. package/dist/skills/hyperframes-cli/references/upgrade-info-misc.md +75 -0
  14. package/dist/studio/assets/hyperframes-player-DgsMQSvV.js +418 -0
  15. package/dist/studio/assets/index-B62bDCQv.css +1 -0
  16. package/dist/studio/assets/index-Ce3pBm_I.js +252 -0
  17. package/dist/studio/assets/{index-BWFaypdT.js → index-D-ET9M0b.js} +1 -1
  18. package/dist/studio/assets/index-D-bS9Dxx.js +1 -0
  19. package/dist/studio/index.html +2 -2
  20. package/dist/templates/_shared/AGENTS.md +46 -21
  21. package/dist/templates/_shared/CLAUDE.md +16 -14
  22. package/package.json +3 -2
  23. package/dist/pngDecodeBlitWorker.js +0 -239
  24. package/dist/skills/gsap/SKILL.md +0 -240
  25. package/dist/skills/gsap/references/effects.md +0 -297
  26. package/dist/skills/gsap/scripts/extract-audio-data.py +0 -188
  27. package/dist/skills/hyperframes/SKILL.md +0 -491
  28. package/dist/skills/hyperframes/data-in-motion.md +0 -19
  29. package/dist/skills/hyperframes/house-style.md +0 -73
  30. package/dist/skills/hyperframes/palettes/bold-energetic.md +0 -14
  31. package/dist/skills/hyperframes/palettes/clean-corporate.md +0 -14
  32. package/dist/skills/hyperframes/palettes/dark-premium.md +0 -14
  33. package/dist/skills/hyperframes/palettes/jewel-rich.md +0 -14
  34. package/dist/skills/hyperframes/palettes/monochrome.md +0 -14
  35. package/dist/skills/hyperframes/palettes/nature-earth.md +0 -14
  36. package/dist/skills/hyperframes/palettes/neon-electric.md +0 -14
  37. package/dist/skills/hyperframes/palettes/pastel-soft.md +0 -14
  38. package/dist/skills/hyperframes/palettes/warm-editorial.md +0 -14
  39. package/dist/skills/hyperframes/patterns.md +0 -191
  40. package/dist/skills/hyperframes/references/audio-reactive.md +0 -76
  41. package/dist/skills/hyperframes/references/beat-direction.md +0 -171
  42. package/dist/skills/hyperframes/references/captions.md +0 -163
  43. package/dist/skills/hyperframes/references/css-patterns.md +0 -373
  44. package/dist/skills/hyperframes/references/design-picker.md +0 -117
  45. package/dist/skills/hyperframes/references/dynamic-techniques.md +0 -102
  46. package/dist/skills/hyperframes/references/html-in-canvas-patterns.md +0 -507
  47. package/dist/skills/hyperframes/references/motion-principles.md +0 -150
  48. package/dist/skills/hyperframes/references/narration.md +0 -92
  49. package/dist/skills/hyperframes/references/prompt-expansion.md +0 -68
  50. package/dist/skills/hyperframes/references/techniques.md +0 -525
  51. package/dist/skills/hyperframes/references/text-effects.md +0 -64
  52. package/dist/skills/hyperframes/references/transcript-guide.md +0 -107
  53. package/dist/skills/hyperframes/references/transitions/catalog.md +0 -117
  54. package/dist/skills/hyperframes/references/transitions/css-3d.md +0 -12
  55. package/dist/skills/hyperframes/references/transitions/css-blur.md +0 -51
  56. package/dist/skills/hyperframes/references/transitions/css-cover.md +0 -43
  57. package/dist/skills/hyperframes/references/transitions/css-destruction.md +0 -95
  58. package/dist/skills/hyperframes/references/transitions/css-dissolve.md +0 -66
  59. package/dist/skills/hyperframes/references/transitions/css-distortion.md +0 -45
  60. package/dist/skills/hyperframes/references/transitions/css-grid.md +0 -10
  61. package/dist/skills/hyperframes/references/transitions/css-light.md +0 -49
  62. package/dist/skills/hyperframes/references/transitions/css-mechanical.md +0 -30
  63. package/dist/skills/hyperframes/references/transitions/css-other.md +0 -25
  64. package/dist/skills/hyperframes/references/transitions/css-push.md +0 -41
  65. package/dist/skills/hyperframes/references/transitions/css-radial.md +0 -37
  66. package/dist/skills/hyperframes/references/transitions/css-scale.md +0 -24
  67. package/dist/skills/hyperframes/references/transitions.md +0 -138
  68. package/dist/skills/hyperframes/references/typography.md +0 -175
  69. package/dist/skills/hyperframes/references/video-composition.md +0 -62
  70. package/dist/skills/hyperframes/scripts/animation-map.mjs +0 -601
  71. package/dist/skills/hyperframes/scripts/contrast-report.mjs +0 -348
  72. package/dist/skills/hyperframes/scripts/package-loader.mjs +0 -269
  73. package/dist/skills/hyperframes/templates/design-picker.html +0 -1432
  74. package/dist/skills/hyperframes/visual-styles.md +0 -443
  75. package/dist/studio/assets/hyperframes-player-0esDKGRk.js +0 -418
  76. package/dist/studio/assets/index-B0twsRu0.css +0 -1
  77. package/dist/studio/assets/index-BA979yF1.js +0 -251
@@ -1,14 +0,0 @@
1
- # Monochrome
2
-
3
- Dramatic, typography-focused, serious content.
4
-
5
- ```
6
- #F8F9FA #E9ECEF #DEE2E6 #CED4DA #ADB5BD #6C757D #495057 #343A40 #212529
7
- #0466C8 #0353A4 #023E7D #002855 #001233
8
- #012A4A #013A63 #01497C #2A6F97 #468FAF #89C2D9
9
- #582F0E #7F4F24 #936639 #A68A64 #C2C5AA
10
- #463F3A #8A817C #BCB8B1 #F4F3EE #E0AFA0
11
- #03071E #370617 #6A040F #9D0208 #DC2F02 #F48C06 #FFBA08
12
- #590D22 #800F2F #A4133C #FF4D6D #FF8FA3 #FFCCD5
13
- #220901 #621708 #941B0C #BC3908 #F6AA1C
14
- ```
@@ -1,14 +0,0 @@
1
- # Nature / Earth
2
-
3
- Sustainability, outdoor, organic, wellness content.
4
-
5
- ```
6
- #606C38 #283618 #FEFAE0 #DDA15E #BC6C25
7
- #DAD7CD #A3B18A #588157 #3A5A40 #344E41
8
- #386641 #6A994E #A7C957 #F2E8CF #BC4749
9
- #CAD2C5 #84A98C #52796F #354F52 #2F3E46
10
- #F0EAD2 #DDE5B6 #ADC178 #A98467 #6C584C
11
- #132A13 #31572C #4F772D #90A955 #ECF39E
12
- #6B9080 #A4C3B2 #CCE3DE #EAF4F4 #F6FFF8
13
- #233D4D #FE7F2D #FCCA46 #A1C181 #619B8A
14
- ```
@@ -1,14 +0,0 @@
1
- # Neon / Electric
2
-
3
- Gaming, tech, nightlife, Gen Z content.
4
-
5
- ```
6
- #F72585 #B5179E #7209B7 #560BAD #3A0CA3
7
- #70D6FF #FF70A6 #FF9770 #FFD670 #E9FF70
8
- #7400B8 #6930C3 #5E60CE #5390D9 #48BFE3
9
- #0B132B #1C2541 #3A506B #5BC0BE #6FFFE9
10
- #540D6E #EE4266 #FFD23F #3BCEAC #0EAD69
11
- #2D00F7 #6A00F4 #8900F2 #A100F2 #F20089
12
- #FF6D00 #FF7900 #FF8500 #FF9100 #240046
13
- #BBFBFF #8DD8FF #4E71FF #5409DA
14
- ```
@@ -1,14 +0,0 @@
1
- # Pastel / Soft
2
-
3
- Fashion, beauty, lifestyle, wellness content.
4
-
5
- ```
6
- #CDB4DB #FFC8DD #FFAFCC #BDE0FE #A2D2FF
7
- #CCD5AE #E9EDC9 #FEFAE0 #FAEDCD #D4A373
8
- #FFD6FF #E7C6FF #C8B6FF #B8C0FF #BBD0FF
9
- #FFA69E #FAF3DD #B8F2E6 #AED9E0 #5E6472
10
- #EDAFB8 #F7E1D7 #DEDBD2 #B0C4B1 #4A5759
11
- #555B6E #89B0AE #BEE3DB #FAF9F9 #FFD6BA
12
- #006D77 #83C5BE #EDF6F9 #FFDDD2 #E29578
13
- #0081A7 #00AFB9 #FDFCDC #FED9B7 #F07167
14
- ```
@@ -1,14 +0,0 @@
1
- # Warm / Editorial
2
-
3
- Storytelling, documentaries, case studies, narrative content.
4
-
5
- ```
6
- #264653 #2A9D8F #E9C46A #F4A261 #E76F51
7
- #335C67 #FFF3B0 #E09F3E #9E2A2B #540B0E
8
- #F4F1DE #E07A5F #3D405B #81B29A #F2CC8F
9
- #F6BD60 #F7EDE2 #F5CAC3 #84A59D #F28482
10
- #003049 #D62828 #F77F00 #FCBF49 #EAE2B7
11
- #588B8B #FFFFFF #FFD5C2 #F28F3B #C8553D
12
- #283D3B #197278 #EDDDD4 #C44536 #772E25
13
- #0D3B66 #FAF0CA #F4D35E #EE964B #F95738
14
- ```
@@ -1,191 +0,0 @@
1
- # Composition Patterns
2
-
3
- ## Picture-in-Picture (Video in a Frame)
4
-
5
- Animate a wrapper div for position/size. The video fills the wrapper. The wrapper has NO data attributes.
6
-
7
- ```html
8
- <div
9
- id="pip-frame"
10
- style="position:absolute;top:0;left:0;width:1920px;height:1080px;z-index:50;overflow:hidden;"
11
- >
12
- <video
13
- id="el-video"
14
- data-start="0"
15
- data-duration="60"
16
- data-track-index="0"
17
- src="talking-head.mp4"
18
- muted
19
- playsinline
20
- ></video>
21
- </div>
22
- ```
23
-
24
- ```js
25
- tl.to(
26
- "#pip-frame",
27
- { top: 700, left: 1360, width: 500, height: 280, borderRadius: 16, duration: 1 },
28
- 10,
29
- );
30
- tl.to("#pip-frame", { left: 40, duration: 0.6 }, 30);
31
- ```
32
-
33
- ## Text Behind Subject (transparent webm overlay)
34
-
35
- Put a headline _behind_ a presenter so their silhouette occludes the text. Requires a transparent cutout produced by `npx hyperframes remove-background presenter.mp4 -o presenter.webm`.
36
-
37
- Three layers, plus one critical rule:
38
-
39
- ```html
40
- <!-- z=1 base — full opaque mp4 (lobby + presenter), always visible -->
41
- <video
42
- id="cf-base"
43
- data-start="0"
44
- data-duration="6"
45
- data-media-start="0"
46
- data-track-index="0"
47
- src="presenter.mp4"
48
- muted
49
- playsinline
50
- ></video>
51
-
52
- <!-- z=2 headline — visible the whole time -->
53
- <h1
54
- id="cf-headline"
55
- style="position:absolute;top:50%;left:50%;
56
- transform:translate(-50%,-50%); z-index:2; font-size:220px; font-weight:900;
57
- color:#fff; text-shadow:0 6px 32px rgba(0,0,0,.55); clip-path:inset(0 0 100% 0);"
58
- >
59
- MAKE IT IN HYPERFRAMES
60
- </h1>
61
-
62
- <!-- z=3 cutout — same source, alpha around presenter, hidden until the cut -->
63
- <!-- WRAPPER has the opacity, NOT the video itself (see rule below). -->
64
- <div class="cutout-wrap" style="position:absolute;inset:0;z-index:3;opacity:0">
65
- <video
66
- id="cf-cutout"
67
- data-start="0"
68
- data-duration="6"
69
- data-media-start="0"
70
- data-track-index="1"
71
- src="presenter.webm"
72
- muted
73
- playsinline
74
- ></video>
75
- </div>
76
- ```
77
-
78
- ```js
79
- const tl = gsap.timeline({ paused: true });
80
- const CUT = 3.3;
81
-
82
- // Reveal headline early
83
- tl.to("#cf-headline", { clipPath: "inset(0 0 0% 0)", duration: 0.6, ease: "expo.out" }, 0.25);
84
-
85
- // At the cut, flip the cutout wrapper visible — the presenter's silhouette
86
- // punches through the headline.
87
- tl.set(".cutout-wrap", { opacity: 1 }, CUT);
88
-
89
- // Sentinel: extend timeline to the composition's full duration so the
90
- // renderer doesn't bail past the last meaningful tween.
91
- tl.set({}, {}, 6);
92
-
93
- window.__timelines["cover-flip"] = tl;
94
- ```
95
-
96
- **Why a wrapper div, not opacity on the video itself?**
97
-
98
- The framework forces `opacity: 1` on any element with `data-start`/`data-duration` while it's "active" — that's how it manages clip lifecycles. A CSS `opacity: 0` on the video element is silently overwritten. Wrap the video in a div with no `data-*` attributes; the wrapper is owned by your CSS/GSAP.
99
-
100
- **Why both videos at `data-start="0"`?**
101
-
102
- So both decode in sync from t=0. Late-mounting the cutout (`data-start=3.3`) makes Chrome do a seek + decoder warm-up at mount, which can land a frame off the base mp4 — visible as a one-frame jitter at the cut.
103
-
104
- **Color match:** `remove-background` defaults to `--quality balanced` (crf 18) which keeps the cutout's RGB nearly identical to the source mp4 — minimal edge halo or color shift when overlaid. Use `--quality best` (crf 12) for hero shots; only drop to `--quality fast` (crf 30) when the cutout sits over a _different_ background and the size matters.
105
-
106
- ## Title Card with Fade
107
-
108
- ```html
109
- <div
110
- id="title-card"
111
- data-start="0"
112
- data-duration="5"
113
- data-track-index="5"
114
- style="display:flex;align-items:center;justify-content:center;background:#111;z-index:60;"
115
- >
116
- <h1 style="font-size:64px;color:#fff;opacity:0;">My Video Title</h1>
117
- </div>
118
- ```
119
-
120
- ```js
121
- tl.to("#title-card h1", { opacity: 1, duration: 0.6 }, 0.3);
122
- tl.to("#title-card", { opacity: 0, duration: 0.5 }, 4);
123
- ```
124
-
125
- ## Slide Show with Section Headers
126
-
127
- Use separate elements on the same track, each with its own time range. Slides auto-mount/unmount based on `data-start`/`data-duration`.
128
-
129
- ```html
130
- <div class="slide" data-start="0" data-duration="30" data-track-index="3">...</div>
131
- <div class="slide" data-start="30" data-duration="25" data-track-index="3">...</div>
132
- <div class="slide" data-start="55" data-duration="20" data-track-index="3">...</div>
133
- ```
134
-
135
- ## Top-Level Composition Example
136
-
137
- ```html
138
- <div
139
- id="comp-1"
140
- data-composition-id="my-video"
141
- data-start="0"
142
- data-duration="60"
143
- data-width="1920"
144
- data-height="1080"
145
- >
146
- <!-- Primitive clips -->
147
- <video
148
- id="el-1"
149
- data-start="0"
150
- data-duration="10"
151
- data-track-index="0"
152
- src="..."
153
- muted
154
- playsinline
155
- ></video>
156
- <video
157
- id="el-2"
158
- data-start="el-1"
159
- data-duration="8"
160
- data-track-index="0"
161
- src="..."
162
- muted
163
- playsinline
164
- ></video>
165
- <img id="el-3" data-start="5" data-duration="4" data-track-index="1" src="..." />
166
- <audio id="el-4" data-start="0" data-duration="30" data-track-index="2" src="..." />
167
-
168
- <!-- Sub-compositions loaded from files -->
169
- <div
170
- id="el-5"
171
- data-composition-id="intro-anim"
172
- data-composition-src="compositions/intro-anim.html"
173
- data-start="0"
174
- data-track-index="3"
175
- ></div>
176
-
177
- <div
178
- id="el-6"
179
- data-composition-id="captions"
180
- data-composition-src="compositions/caption-overlay.html"
181
- data-start="0"
182
- data-track-index="4"
183
- ></div>
184
-
185
- <script>
186
- // Just register the timeline — framework auto-nests sub-compositions
187
- const tl = gsap.timeline({ paused: true });
188
- window.__timelines["my-video"] = tl;
189
- </script>
190
- </div>
191
- ```
@@ -1,76 +0,0 @@
1
- # Audio-Reactive Animation
2
-
3
- Drive visuals from music, voice, or sound. Any GSAP-animatable property can respond to pre-extracted audio data.
4
-
5
- ## Audio Data Format
6
-
7
- ```js
8
- var AUDIO_DATA = {
9
- fps: 30,
10
- totalFrames: 900,
11
- frames: [{ bands: [0.82, 0.45, 0.31, ...] }, ...]
12
- };
13
- ```
14
-
15
- - `frames[i].bands[]` — frequency band amplitudes, 0-1. Index 0 = bass, higher = treble.
16
- - Each band normalized independently across the full track.
17
-
18
- ## Mapping Audio to Visuals
19
-
20
- | Audio signal | Visual property | Effect |
21
- | ---------------------- | --------------------------------- | -------------------------- |
22
- | Bass (bands[0]) | `scale` | Pulse on beat |
23
- | Treble (bands[12-14]) | `textShadow`, `boxShadow` | Glow intensity |
24
- | Overall amplitude | `opacity`, `y`, `backgroundColor` | Breathe, lift, color shift |
25
- | Mid-range (bands[4-8]) | `borderRadius`, `width` | Shape morphing |
26
-
27
- Any GSAP-tweenable property works — `clipPath`, `filter`, SVG attributes, CSS custom properties.
28
-
29
- ## Content, Not Medium
30
-
31
- Audio provides **timing and intensity**. The visual vocabulary comes from the narrative.
32
-
33
- **Never add:** equalizer bars, spectrum analyzers, waveform displays, musical notes clip art, generic particle systems, rainbow color cycling, strobing white on beats, abstract pulsing orbs.
34
-
35
- **Instead:** Let content guide the visual and audio drive its behavior. Bass makes warmth _swell_. Treble sharpens _contrast_. The visual choice comes from "what does this piece feel like?"
36
-
37
- ## Sampling Pattern
38
-
39
- Audio reactivity requires per-frame sampling via a `for` loop with `tl.call()`, not a single tween:
40
-
41
- ```js
42
- // ✅ Correct — sample every frame
43
- for (var f = 0; f < AUDIO_DATA.totalFrames; f++) {
44
- tl.call(
45
- (function (frame) {
46
- return function () {
47
- draw(frame);
48
- };
49
- })(AUDIO_DATA.frames[f]),
50
- [],
51
- f / AUDIO_DATA.fps,
52
- );
53
- }
54
-
55
- // ❌ Wrong — single tween, doesn't react to audio
56
- gsap.to(".el", { scale: 1.2, duration: totalDuration });
57
- ```
58
-
59
- Without per-frame sampling, the composition doesn't actually react to audio.
60
-
61
- ## textShadow Gotcha
62
-
63
- `textShadow` on a parent container with semi-transparent children (e.g., inactive caption words at `rgba(255,255,255,0.3)`) renders a visible glow rectangle behind all children. Fix: apply `scale` to the container for beat pulse, but apply `textShadow` to individual active words only.
64
-
65
- ## Guidelines
66
-
67
- - **Subtlety for text** — 3-6% scale variation, soft glow. Heavy pulsing makes text unreadable.
68
- - **Go bigger on non-text** — backgrounds and shapes can handle 10-30% swings.
69
- - **Match the energy** — corporate = subtle; music video = dramatic.
70
- - **Deterministic** — pre-extracted data, no Web Audio API, no runtime analysis.
71
-
72
- ## Constraints
73
-
74
- - All audio data must be pre-extracted (use `extract-audio-data.py` from the gsap skill's scripts/)
75
- - No `Math.random()` or `Date.now()`
76
- - Audio reactivity runs on the same GSAP timeline as everything else
@@ -1,171 +0,0 @@
1
- # Beat Direction
2
-
3
- How to plan and direct individual scenes (beats) in a multi-scene composition. Read before writing any multi-scene video.
4
-
5
- ---
6
-
7
- ## Per-Beat Direction
8
-
9
- Each beat is a WORLD, not a layout. Before writing CSS specs and GSAP instructions, describe what the viewer EXPERIENCES. The difference between a great storyboard and a mediocre one:
10
-
11
- **Mediocre:** "Dark navy background. '$1.9T' in white, 280px. Logo top-left. Wave image bottom-right."
12
- **Great:** "Camera is already mid-flight over a vast dark canvas. The gradient wave sweeps across the frame like aurora borealis — alive, shifting. '$1.9T' SLAMS into existence with such force the wave ripples in response. This isn't a slide — it's a moment."
13
-
14
- The first describes pixels. The second describes an experience. Write the second, then figure out the pixels.
15
-
16
- Each beat should have:
17
-
18
- **For text animations:** pick a named effect from the [`text-effects.md`](text-effects.md) reference and name it by ID in the storyboard. Don't describe "text fades in" — write `soft-blur-in` or `kinetic-center-build`. The catalog is maintained as a separate skill (`pixel-point/animate-text`); see `text-effects.md` for how sub-agents load it and find the implementation specs.
19
-
20
- ---
21
-
22
- ### Concept
23
-
24
- The big idea for this beat in 2-3 sentences. What visual WORLD are we in? What metaphor drives it? What should the viewer FEEL? This is the most important part — everything else flows from it.
25
-
26
- ### Mood direction
27
-
28
- Cultural and design references, not hex codes:
29
-
30
- - "Geometric, rhythmic, precise. Think Josef Albers or Bauhaus color studies."
31
- - "Warm workspace. Nice notebook energy, not technical blueprint."
32
- - "Cinematic title sequence. The kind of opening where you lean forward."
33
-
34
- ### Animation choreography
35
-
36
- Specific motion verbs per element — not "it animates in" but HOW. Verbs come from the beat's concept and content, not from an energy bucket. A wellness brand's "slow" beat might still have something that DROPS if the content is about letting go. A stats beat might FLOAT if the brand's identity is weightless.
37
-
38
- The vocabulary of motion verbs (organized by physical character, not by energy level):
39
-
40
- **Impact / weight:** SLAMS, CRASHES, PUNCHES, STAMPS, SHATTERS, DROPS (with force)
41
- **Directional / deliberate:** SLIDES, PUSHES, PULLS, WIPES, CUTS
42
- **Reveals / builds:** DRAWS, FILLS, GROWS, EXPANDS, ASSEMBLES, COUNTS UP
43
- **Organic / ambient:** FLOATS, DRIFTS, BREATHES, PULSES, ORBITS, MORPHS
44
- **Mechanical / precise:** TYPES ON, CLICKS, LOCKS IN, SNAPS, STEPS
45
-
46
- Every element gets a verb. If you can't name the verb, the element is not yet designed. The verb should follow from the beat's concept — not from a lookup of what "high energy" or "low energy" beats use.
47
-
48
- ### Transition
49
-
50
- How this beat hands off to the next. Specify the type and parameters.
51
-
52
- **When to pick which:**
53
-
54
- | Choose shader transition for | Choose CSS transition for | Choose hard cut for |
55
- | ------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | -------------------------------------------------------------- |
56
- | Reveals, big reaction shots, product/logo unveils, energy shifts, "wow" moments | Continuous camera-motion beats where the scene feels like one move broken into cuts | Rapid-fire lists, percussive edits on the beat, comedic timing |
57
- | Any moment the music/VO punctuates with a downbeat or SFX hit | Beats that ease from one composition into the next with shared motion vocabulary | Sequences of 3+ quick tempo-matched switches |
58
- | Brand moments where the transition itself _is_ the visual | Minimal/editorial pacing | Anytime a 0.3-0.8s transition would feel too slow |
59
-
60
- Rule of thumb: if the beat is the _centerpiece_ of the video, shader-transition into it. If the beat is connective tissue, a CSS crossfade is fine. A brand reel of 5-7 beats usually wants 1-2 shader transitions (the hero reveal + the CTA) — too many flatten their impact.
61
-
62
- **Mixing shader and CSS crossfade transitions in one composition is supported.** Omit `shader` on any transition entry to get a smooth opacity crossfade. HyperShader manages all scene visibility regardless:
63
-
64
- ```js
65
- var tl = HyperShader.init({
66
- bgColor: "#0a0a0f",
67
- scenes: ["s1", "s2", "s3", "s4"],
68
- transitions: [
69
- { time: 4.0, shader: "sdf-iris", duration: 0.7 }, // WebGL shader
70
- { time: 8.5, duration: 0.8 }, // no shader → CSS crossfade
71
- { time: 13.0, shader: "domain-warp", duration: 0.6 },
72
- ],
73
- });
74
- // Add beat animations to the returned tl AFTER init()
75
- tl.fromTo("#hero", { opacity: 0 }, { opacity: 1, duration: 0.6 }, 0.2);
76
- window.__timelines["main"] = tl;
77
- ```
78
-
79
- Let HyperShader create the timeline — don't pass a pre-built `timeline:` option. Add all composition tweens to the returned `tl` after the call.
80
-
81
- **CSS transitions** — 30+ patterns across 13 categories. Full code in `skills/hyperframes/references/transitions/`. Pick based on the energy and feel:
82
-
83
- | Category | Patterns | Motion character |
84
- | ------------------ | ------------------------------------------------------------------------ | -------------------------------------------------------------------------- |
85
- | **Push / slide** | Push slide, vertical push, elastic push, squeeze | Content moves through the frame as if on a continuous surface |
86
- | **Scale / zoom** | Zoom through, zoom out | Perspective shifts — moving toward or away from content |
87
- | **Radial / clip** | Circle iris, diamond iris, diagonal split | Geometric reveal — content emerges or is covered by a shape |
88
- | **3D** | 3D card flip | Physical — content flips like a tangible object |
89
- | **Dissolve** | Crossfade, blur crossfade, focus pull, color dip | Overlap and blend — both scenes exist simultaneously during the transition |
90
- | **Cover / blinds** | Staggered color blocks, horizontal blinds (6/12 strips), vertical blinds | Structural — content is sliced, layered, or covered |
91
- | **Light** | Light leak overlays, overexposure burn, film burn | Organic film — light bleeds across the frame |
92
- | **Distortion** | Glitch (CSS RGB jitter), chromatic aberration, ripple, VHS tape | Instability — the image itself appears to malfunction |
93
- | **Blur** | Blur through, directional blur | Soft defocus — content blurs in or out |
94
- | **Mechanical** | Shutter (two-half), clock wipe (9-point wedge) | Precision — transitions with visible mechanical logic |
95
- | **Grid** | Grid dissolve (12/120 cells) | Fragmentation — the frame breaks into pieces |
96
- | **Destruction** | Page burn (SVG clip-path + canvas rim) | Dramatic decay — the previous scene is destroyed |
97
- | **Other** | Gravity drop, morph circle | Physical or shape-based motion that doesn't fit other categories |
98
-
99
- Common quick-picks:
100
-
101
- - **Velocity-matched upward**: exit `y:-150, blur:30px, 0.33s power2.in` → entry `y:150→0, blur:30px→0, 1.0s power2.out`
102
- - **Whip pan**: exit `x:-400, blur:24px, 0.3s power3.in` → entry `x:400→0, blur:24px→0, 0.3s power3.out`
103
- - **Blur through**: exit `blur:20px, 0.3s` → entry `blur:20px→0, 0.25s power3.out`
104
- - **Zoom through**: exit `scale:1→1.2, blur:20px, 0.2s power3.in` → entry `scale:0.75→1, blur:20px→0, 0.5s expo.out`
105
- - **Hard cut / smash cut**: instant, for rapid-fire sequences
106
-
107
- Timing presets: snappy (0.2s), smooth (0.4s), gentle (0.6s), dramatic (0.5s), instant (0.15s), luxe (0.7s).
108
-
109
- **Shader transitions** — 14 built-in WebGL GPU effects. Install with `npx hyperframes add <name>`. Full API in shader-transitions docs.
110
-
111
- | Shader | Visual description | Duration range |
112
- | ----------------------- | ---------------------------------------------------------------------------------------------- | -------------- |
113
- | **domain-warp** | Organic FBM dissolve — both scenes warp toward each other with an accent flash at the midpoint | 0.5–0.8s |
114
- | **ridged-burn** | Multifractal mask reveals the incoming scene through a burn ramp with sparks at the edge | 0.5–0.8s |
115
- | **whip-pan** | 10-sample horizontal motion blur + lateral crossfade — reads like a camera pan between shots | 0.3–0.5s |
116
- | **sdf-iris** | Circle SDF expands from center, with accent-tinted glow rings at the expanding edge | 0.5–0.7s |
117
- | **ripple-waves** | Radial standing-wave UV displacement — content ripples outward as scenes cross | 0.6–1.0s |
118
- | **gravitational-lens** | Pinch pull toward center + R/B chromatic separation — content bends inward then releases | 0.6–1.0s |
119
- | **cinematic-zoom** | 12 RGB-offset radial zoom blur samples — motion streak radiating from center | 0.4–0.6s |
120
- | **chromatic-split** | R/B radial channel shift outward, G fixed — channels separate then rejoin | 0.3–0.5s |
121
- | **swirl-vortex** | CCW swirl with FBM noise — content spirals away and the new scene spirals in | 0.5–0.8s |
122
- | **thermal-distortion** | Vertical sine + FBM horizontal displacement — heat-haze shimmer across the frame | 0.5–0.8s |
123
- | **flash-through-white** | Fade through white midpoint — almost invisible at 0.01s, noticeable at 0.3s | 0.01s–0.3s |
124
- | **cross-warp-morph** | FBM vector field displaces both scenes; a third FBM biases the wipe direction | 0.5–0.8s |
125
- | **light-leak** | Fixed off-frame light source with exponential falloff, warmth, and a ridge flare | 0.5–0.8s |
126
- | **glitch** | Line displacement + RGB lateral split + scan modulation + posterization + flicker | 0.3–0.5s |
127
-
128
- **You are not limited to what's listed here.** These are the built-in options, but you can and should:
129
-
130
- - **Write custom GLSL shaders** from scratch for unique transition effects
131
- - **Search online** for shader code (ShaderToy, GLSL Sandbox, GitHub) and adapt it
132
- - **Build custom CSS transitions** that aren't in any category — combine clip-path, transforms, filters in new ways
133
- - **Ask the user** to provide or find specific effects if you need something specialized
134
-
135
- If the storyboard calls for an effect that doesn't exist yet — build it. The framework renders anything a browser can run.
136
-
137
- ### Depth layers
138
-
139
- What's in foreground, midground, and background. Every beat should have at least 2 layers:
140
-
141
- - "BG: dark navy fill + subtle radial glow. MG: stat cards with drop shadow. FG: brand logo bottom-right."
142
-
143
- ### SFX cues
144
-
145
- What sounds at what moment:
146
-
147
- - "On the capture pulse — a soft, warm analog shutter click."
148
- - "Left side carries a faint low drone. On fold: drone cuts. Silence. Then a single clean chime."
149
-
150
- ---
151
-
152
- ## Rhythm Planning
153
-
154
- Before writing HTML, declare your scene rhythm: which scenes are quick hits, which are holds, where do shaders land, where does energy peak. Name the pattern — fast-fast-SLOW-fast-SHADER-hold — before implementing.
155
-
156
- **Derive the rhythm from the storyboard and the brand, not from a lookup.** A 15-second social ad for an architectural firm and a 15-second social ad for a gaming brand have different rhythms — both are 15 seconds, but one is slow-reveal-hold-CTA and the other is rapid-fire-SLAM-hook. Video type sets constraints (duration, approximate beat count); the brand and content determine whether those beats are slow or fast, sparse or dense, dramatic or controlled.
157
-
158
- Questions that drive rhythm decisions:
159
-
160
- - What emotional journey should the viewer take? Where is the peak moment?
161
- - Where does the narration land its heaviest emphasis? That's usually where energy should peak.
162
- - What does the brand's own visual pacing suggest — unhurried or urgent?
163
- - How many beats can the duration actually support without feeling rushed or padded?
164
-
165
- A social ad that tries to hook in 2s, showcase 3 features, and end with a CTA in 15s will feel like noise. Sometimes "hook-hold-CTA" with one strong feature is the right rhythm for 15 seconds. Name the rhythm you've planned before implementing.
166
-
167
- ---
168
-
169
- ## Velocity-Matched Transitions
170
-
171
- Exit the outgoing beat with an accelerating ease (power2.in or power3.in) plus a blur ramp. Enter the incoming beat with a decelerating ease (power2.out or power3.out) plus blur clear. The fastest point of both easing curves meets at the cut — the viewer perceives continuous camera motion, not two discrete animations. Match exit velocity to entry velocity within ~5% tolerance.