hyperframes 0.6.30 → 0.6.32

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.
@@ -473,7 +473,8 @@ Skip on small edits (fixing a color, adjusting one duration). Run on new composi
473
473
  - **[references/beat-direction.md](references/beat-direction.md)** — Beat planning: concept, mood, choreography verbs, rhythm templates, transition decisions, depth layers. **Always read for multi-scene compositions.**
474
474
  - **[references/typography.md](references/typography.md)** — Typography: font pairing, OpenType features, dark-background adjustments, font discovery script. **Always read** — every composition has text.
475
475
  - **[references/motion-principles.md](references/motion-principles.md)** — Motion design principles, image motion treatment, load-bearing GSAP rules. **Always read** — every composition has motion.
476
- - **[references/techniques.md](references/techniques.md)** — 11 visual techniques with code patterns: SVG drawing, Canvas 2D, CSS 3D, kinetic type, Lottie, video compositing, typing effect, variable fonts, MotionPath, velocity transitions, audio-reactive. Read when planning techniques per beat.
476
+ - **[references/techniques.md](references/techniques.md)** — 13 primitive animation techniques with code patterns: SVG drawing, Canvas 2D, CSS 3D, kinetic type, Lottie, video compositing, typing, variable fonts, MotionPath, velocity transitions, audio-reactive, clip-path reveals, WebGL shaders. Adapt the patterns don't copy-paste. (For pre-built UI templates — terminal chrome, device mockups, moodboard layouts — see `registry/blocks/`.)
477
+ - **[references/html-in-canvas-patterns.md](references/html-in-canvas-patterns.md)** — HTML-in-Canvas patterns: live DOM as GPU texture via `drawElementImage` + `layoutsubtree`. Shared boilerplate + ~6 effect recipes (iPhone/MacBook mockups, liquid glass, magnetic, portal, shatter, text cursor). Use for 1–3 hero beats per video.
477
478
  - **[references/narration.md](references/narration.md)** — Pacing, tone, script structure, number pronunciation, opening line patterns. Read when the composition includes voiceover or TTS.
478
479
  - **[references/design-picker.md](references/design-picker.md)** — Create a design.md via visual picker. Read when no design.md exists and the user wants to create one.
479
480
  - **[visual-styles.md](visual-styles.md)** — 8 named visual styles with hex palettes, GSAP easing signatures, and shader pairings. Read when user names a style or when generating design.md.
@@ -15,6 +15,10 @@ The first describes pixels. The second describes an experience. Write the second
15
15
 
16
16
  Each beat should have:
17
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
+
18
22
  ### Concept
19
23
 
20
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.
@@ -29,15 +33,17 @@ Cultural and design references, not hex codes:
29
33
 
30
34
  ### Animation choreography
31
35
 
32
- Specific motion verbs per element — not "it animates in" but HOW:
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.
33
37
 
34
- | Energy | Verbs | Example |
35
- | ------------- | --------------------------------------------- | ------------------------------------- |
36
- | High impact | SLAMS, CRASHES, PUNCHES, STAMPS, SHATTERS | "$1.9T" SLAMS in from left at -5° |
37
- | Medium energy | CASCADE, SLIDES, DROPS, FILLS, DRAWS | Three cards CASCADE in staggered 0.3s |
38
- | Low energy | types on, FLOATS, morphs, COUNTS UP, fades in | Counter COUNTS UP from 0 to 135K |
38
+ The vocabulary of motion verbs (organized by physical character, not by energy level):
39
39
 
40
- Every element gets a verb. If you can't name the verb, the element is not yet designed.
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.
41
47
 
42
48
  ### Transition
43
49
 
@@ -51,23 +57,82 @@ How this beat hands off to the next. Specify the type and parameters.
51
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 |
52
58
  | Brand moments where the transition itself _is_ the visual | Minimal/editorial pacing | Anytime a 0.3-0.8s transition would feel too slow |
53
59
 
54
- Rule of thumb: if the beat is the _centerpiece_ of the video, shader-transition into it. If the beat is connective tissue, CSS-transition. A brand reel of 5-7 beats usually wants 1-2 shader transitions (the hero reveal + the CTA) and the rest CSS or hard cuts — too many shader transitions flatten their impact.
55
-
56
- **CSS transitions** (choose from `skills/hyperframes/references/transitions/catalog.md`):
57
-
58
- - Velocity-matched upward: exit `y:-150, blur:30px, 0.33s power2.in` → entry `y:150→0, blur:30px→0, 1.0s power2.out`
59
- - Whip pan: exit `x:-400, blur:24px, 0.3s power3.in` → entry `x:400→0, blur:24px→0, 0.3s power3.out`
60
- - Blur through: exit `blur:20px, 0.3s` → entry `blur:20px→0, 0.25s power3.out`
61
- - 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`
62
- - Hard cut / smash cut (for rapid-fire sequences)
63
-
64
- **Shader transitions** (choose from `packages/shader-transitions/README.md`):
65
-
66
- - Cross-Warp Morph (organic, versatile) — 0.5-0.8s, power2.inOut
67
- - Cinematic Zoom (professional momentum) — 0.4-0.6s, power2.inOut
68
- - Gravitational Lens (otherworldly) 0.6-1.0s, power2.inOut
69
- - Glitch (aggressive, high energy) 0.3-0.5s
70
- - See `packages/shader-transitions/README.md` for the full API, available shaders, and setup
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.
71
136
 
72
137
  ### Depth layers
73
138
 
@@ -88,12 +153,16 @@ What sounds at what moment:
88
153
 
89
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.
90
155
 
91
- | Video type | Typical rhythm pattern |
92
- | ---------------------- | --------------------------------- |
93
- | Social ad (15s) | hook-PUNCH-hold-CTA |
94
- | Product demo (30-60s) | slow-build-BUILD-PEAK-breathe-CTA |
95
- | Launch teaser (10-20s) | SLAM-proof-SLAM-hold |
96
- | Brand reel (20-45s) | drift-build-PEAK-drift-resolve |
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.
97
166
 
98
167
  ---
99
168
 
@@ -4,13 +4,25 @@ You are here because SKILL.md told you to read this file before writing animatio
4
4
 
5
5
  ## Technique Selection by Energy
6
6
 
7
- | Energy level | Highlight | Exit | Cycle pattern |
8
- | ------------ | ------------------------------------- | ------------------- | ----------------------------------------- |
9
- | High | Karaoke with accent glow + scale pop | Scatter or drop | Alternate highlight styles every 2 groups |
10
- | Medium-high | Karaoke with color pop | Scatter or collapse | Alternate every 3 groups |
11
- | Medium | Karaoke (subtle, white only) | Fade + slide | Alternate every 3 groups |
12
- | Medium-low | Karaoke (minimal scale change) | Fade | Single style, vary ease per group |
13
- | Low | Karaoke (warm tones, slow transition) | Collapse | Alternate every 4 groups |
7
+ Captions are a constrained surface the highlight and exit technique is closely tied to how much intensity the spoken content carries. The table below is a calibration reference. If DESIGN.md or the storyboard specifies a caption style, that overrides anything here.
8
+
9
+ The core principle: **all energy levels use karaoke highlight as the baseline.** The difference is intensity not the technique type.
10
+
11
+ **What changes with energy:**
12
+
13
+ - **Highlight intensity:** high energy gets accent color + glow + 15% scale pop on active words. Low energy gets a gentle white shift with 3% scale. The karaoke behavior is the same; the amplitude is different.
14
+ - **Exit style:** high energy exits scatter or drop (the word leaves with motion). Low energy exits collapse (the word simply fades or shrinks). The exit should express the same energy as the content.
15
+ - **Cycle variation:** high energy alternates highlight styles every 2 groups for variety. Low energy uses a single consistent style, varying only the ease. Variation itself creates energy; consistency creates calm.
16
+
17
+ Calibration reference (starting points, not rules):
18
+
19
+ | Energy level | Highlight amplitude | Exit | Cycle variation |
20
+ | ------------ | ----------------------------------- | ------------------- | --------------- |
21
+ | High | Accent color + glow + 15% scale pop | Scatter or drop | Every 2 groups |
22
+ | Medium-high | Color pop, no glow | Scatter or collapse | Every 3 groups |
23
+ | Medium | White shift only | Fade + slide | Every 3 groups |
24
+ | Medium-low | Minimal scale change | Fade | Single style |
25
+ | Low | Warm tones, slow transition | Collapse | Single style |
14
26
 
15
27
  **All energy levels use karaoke highlight as the baseline.** The difference is intensity — high energy gets accent color + glow + 15% scale pop on active words, low energy gets a gentle white shift with 3% scale.
16
28