dsh-hyperframes 0.1.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.
Files changed (66) hide show
  1. package/README.en.md +35 -0
  2. package/README.md +35 -0
  3. package/cordis.patch.yml +7 -0
  4. package/lib/index.d.ts +35 -0
  5. package/lib/index.js +74 -0
  6. package/package.json +63 -0
  7. package/skills/gsap/SKILL.md +213 -0
  8. package/skills/gsap/references/effects.md +297 -0
  9. package/skills/gsap/scripts/extract-audio-data.py +188 -0
  10. package/skills/hyperframes/SKILL.md +366 -0
  11. package/skills/hyperframes/data-in-motion.md +19 -0
  12. package/skills/hyperframes/house-style.md +71 -0
  13. package/skills/hyperframes/palettes/bold-energetic.md +14 -0
  14. package/skills/hyperframes/palettes/clean-corporate.md +14 -0
  15. package/skills/hyperframes/palettes/dark-premium.md +14 -0
  16. package/skills/hyperframes/palettes/jewel-rich.md +14 -0
  17. package/skills/hyperframes/palettes/monochrome.md +14 -0
  18. package/skills/hyperframes/palettes/nature-earth.md +14 -0
  19. package/skills/hyperframes/palettes/neon-electric.md +14 -0
  20. package/skills/hyperframes/palettes/pastel-soft.md +14 -0
  21. package/skills/hyperframes/palettes/warm-editorial.md +14 -0
  22. package/skills/hyperframes/patterns.md +118 -0
  23. package/skills/hyperframes/references/audio-reactive.md +76 -0
  24. package/skills/hyperframes/references/captions.md +132 -0
  25. package/skills/hyperframes/references/css-patterns.md +373 -0
  26. package/skills/hyperframes/references/dynamic-techniques.md +90 -0
  27. package/skills/hyperframes/references/motion-principles.md +69 -0
  28. package/skills/hyperframes/references/transcript-guide.md +151 -0
  29. package/skills/hyperframes/references/transitions/catalog.md +117 -0
  30. package/skills/hyperframes/references/transitions/css-3d.md +12 -0
  31. package/skills/hyperframes/references/transitions/css-blur.md +51 -0
  32. package/skills/hyperframes/references/transitions/css-cover.md +43 -0
  33. package/skills/hyperframes/references/transitions/css-destruction.md +95 -0
  34. package/skills/hyperframes/references/transitions/css-dissolve.md +66 -0
  35. package/skills/hyperframes/references/transitions/css-distortion.md +45 -0
  36. package/skills/hyperframes/references/transitions/css-grid.md +10 -0
  37. package/skills/hyperframes/references/transitions/css-light.md +49 -0
  38. package/skills/hyperframes/references/transitions/css-mechanical.md +30 -0
  39. package/skills/hyperframes/references/transitions/css-other.md +25 -0
  40. package/skills/hyperframes/references/transitions/css-push.md +41 -0
  41. package/skills/hyperframes/references/transitions/css-radial.md +37 -0
  42. package/skills/hyperframes/references/transitions/css-scale.md +24 -0
  43. package/skills/hyperframes/references/transitions.md +112 -0
  44. package/skills/hyperframes/references/tts.md +75 -0
  45. package/skills/hyperframes/references/typography.md +175 -0
  46. package/skills/hyperframes/scripts/animation-map.mjs +596 -0
  47. package/skills/hyperframes/scripts/contrast-report.mjs +335 -0
  48. package/skills/hyperframes/visual-styles.md +211 -0
  49. package/skills/hyperframes-cli/SKILL.md +152 -0
  50. package/skills/hyperframes-registry/SKILL.md +106 -0
  51. package/skills/hyperframes-registry/examples/add-block.md +51 -0
  52. package/skills/hyperframes-registry/examples/add-component.md +73 -0
  53. package/skills/hyperframes-registry/references/demo-html-pattern.md +54 -0
  54. package/skills/hyperframes-registry/references/discovery.md +53 -0
  55. package/skills/hyperframes-registry/references/install-locations.md +45 -0
  56. package/skills/hyperframes-registry/references/wiring-blocks.md +91 -0
  57. package/skills/hyperframes-registry/references/wiring-components.md +77 -0
  58. package/skills/website-to-hyperframes/SKILL.md +125 -0
  59. package/skills/website-to-hyperframes/references/step-1-capture.md +74 -0
  60. package/skills/website-to-hyperframes/references/step-2-design.md +178 -0
  61. package/skills/website-to-hyperframes/references/step-3-script.md +96 -0
  62. package/skills/website-to-hyperframes/references/step-4-storyboard.md +246 -0
  63. package/skills/website-to-hyperframes/references/step-5-vo.md +42 -0
  64. package/skills/website-to-hyperframes/references/step-6-build.md +229 -0
  65. package/skills/website-to-hyperframes/references/step-7-validate.md +114 -0
  66. package/skills/website-to-hyperframes/references/techniques.md +387 -0
@@ -0,0 +1,66 @@
1
+ ## Dissolve
2
+
3
+ ### Crossfade
4
+
5
+ Simple opacity swap. The baseline.
6
+
7
+ ```js
8
+ tl.to(old, { opacity: 0, duration: 0.5, ease: "power2.inOut" }, T);
9
+ tl.fromTo(new, { opacity: 0 }, { opacity: 1, duration: 0.5, ease: "power2.inOut" }, T);
10
+ ```
11
+
12
+ ### Blur Crossfade
13
+
14
+ Dissolve with blur + scale shift. **Scale blur amount by energy** — see SKILL.md "Blur Intensity by Energy" section. The examples below show the medium (default) version. For calm compositions, increase to 20-30px with a 0.3-0.5s hold at peak blur. For high-energy, decrease to 3-6px with no hold.
15
+
16
+ **Medium (default):**
17
+
18
+ ```js
19
+ tl.to(old, { filter: "blur(10px)", scale: 1.03, opacity: 0, duration: 0.5, ease: "power2.inOut" }, T);
20
+ tl.fromTo(new,
21
+ { filter: "blur(10px)", scale: 0.97, opacity: 0 },
22
+ { filter: "blur(0px)", scale: 1, opacity: 1, duration: 0.5, ease: "power2.inOut" }, T + 0.1);
23
+ ```
24
+
25
+ **Calm (wellness, luxury) — heavy blur, holds at abstract color:**
26
+
27
+ ```js
28
+ tl.to(old, { filter: "blur(25px)", scale: 1.05, duration: 0.6, ease: "power1.in" }, T);
29
+ tl.to(old, { opacity: 0, duration: 0.4, ease: "power1.in" }, T + 0.4);
30
+ tl.fromTo(new,
31
+ { filter: "blur(25px)", scale: 0.95, opacity: 0 },
32
+ { filter: "blur(25px)", scale: 0.95, opacity: 1, duration: 0.3, ease: "power1.inOut" }, T + 0.5);
33
+ tl.to(new, { filter: "blur(0px)", scale: 1, duration: 0.6, ease: "power1.out" }, T + 0.8);
34
+ ```
35
+
36
+ ### Focus Pull
37
+
38
+ Outgoing slowly blurs while incoming fades in sharp. Depth-of-field feel. **Scale blur amount and hold duration by energy.**
39
+
40
+ **Medium:**
41
+
42
+ ```js
43
+ tl.to(old, { filter: "blur(15px)", duration: 0.5, ease: "power1.in" }, T);
44
+ tl.to(old, { opacity: 0, duration: 0.3, ease: "power2.in" }, T + 0.25);
45
+ tl.fromTo(new, { opacity: 0 }, { opacity: 1, duration: 0.3, ease: "power2.out" }, T + 0.25);
46
+ ```
47
+
48
+ **Calm — slow rack focus with long hold at peak defocus:**
49
+
50
+ ```js
51
+ tl.to(old, { filter: "blur(30px)", duration: 0.8, ease: "power1.in" }, T);
52
+ tl.to(old, { opacity: 0, duration: 0.5, ease: "power1.in" }, T + 0.6);
53
+ tl.fromTo(new, { opacity: 0, filter: "blur(20px)" },
54
+ { opacity: 1, filter: "blur(20px)", duration: 0.3, ease: "power1.inOut" }, T + 0.7);
55
+ tl.to(new, { filter: "blur(0px)", duration: 0.6, ease: "power1.out" }, T + 1.0);
56
+ ```
57
+
58
+ ### Color Dip
59
+
60
+ Fade to solid color, hold, fade up new scene.
61
+
62
+ ```js
63
+ tl.to(old, { opacity: 0, duration: 0.2, ease: "power2.in" }, T);
64
+ // Background color shows through
65
+ tl.fromTo(new, { opacity: 0 }, { opacity: 1, duration: 0.2, ease: "power2.out" }, T + 0.25);
66
+ ```
@@ -0,0 +1,45 @@
1
+ ## Distortion
2
+
3
+ ### Glitch
4
+
5
+ RGB-tinted overlays (NOT multiply blend — use normal blending at 35% opacity) jitter with large offsets. Scene itself also jitters.
6
+
7
+ ```js
8
+ tl.set("#glitch-r", { opacity: 1, x: 40, y: -8 }, T);
9
+ tl.set("#glitch-g", { opacity: 1, x: -30, y: 12 }, T);
10
+ tl.set("#glitch-b", { opacity: 1, x: 15, y: -20 }, T);
11
+ tl.set(old, { x: -15 }, T);
12
+ // 6 jitter frames at 0.03s intervals with big offsets (±30-60px)
13
+ // ... swap and clear at T + 0.2
14
+ ```
15
+
16
+ ### Chromatic Aberration
17
+
18
+ RGB overlays start aligned then spread apart (±80px), scene fades, converge on new scene.
19
+
20
+ ```js
21
+ tl.set("#glitch-r", { opacity: 0.6, x: 0 }, T);
22
+ tl.set("#glitch-g", { opacity: 0.6, x: 0 }, T);
23
+ tl.set("#glitch-b", { opacity: 0.6, x: 0 }, T);
24
+ tl.to("#glitch-r", { x: -80, opacity: 0.8, duration: 0.3, ease: "power2.in" }, T);
25
+ tl.to("#glitch-b", { x: 80, opacity: 0.8, duration: 0.3, ease: "power2.in" }, T);
26
+ tl.to("#glitch-g", { y: 30, duration: 0.3, ease: "power2.in" }, T);
27
+ // Swap at T + 0.3, converge back at T + 0.3
28
+ ```
29
+
30
+ ### Ripple
31
+
32
+ Rapid oscillation (±30px) + scale distortion (0.97-1.03) + increasing blur. Swap at peak distortion.
33
+
34
+ ```js
35
+ tl.to(old, { x: 30, scale: 1.02, duration: 0.04, ease: "none" }, T);
36
+ tl.to(old, { x: -25, scale: 0.98, filter: "blur(4px)", duration: 0.04, ease: "none" }, T + 0.04);
37
+ // ... more oscillations with increasing blur
38
+ // Swap at peak, incoming stabilizes with decreasing wobble
39
+ ```
40
+
41
+ ### VHS Tape
42
+
43
+ Clone scene into 20 horizontal strips (each 54px, clip-path'd). Each strip shifts x independently with seeded pseudo-random offsets at per-bar random intervals. Add red+blue chromatic offset copies on each strip (z-index above main, 35% opacity). Make strips wider than frame (2020px at left:-50px) so edges never show.
44
+
45
+ See SKILL.md for clone-based implementation pattern.
@@ -0,0 +1,10 @@
1
+ ## Grid
2
+
3
+ ### Grid Dissolve
4
+
5
+ Grid of colored cells covers the frame in a ripple from center. Scene swaps at 50% coverage. Cells fade out in ripple.
6
+
7
+ **12-cell** (4x3, each 480x270): standard
8
+ **120-cell** (12x10, each 160x108): dense variant — lower opacity (0.75), tighter ripple
9
+
10
+ Cells are created dynamically in JS, sorted by distance from center for ripple stagger.
@@ -0,0 +1,49 @@
1
+ ## Light
2
+
3
+ ### Light Leak
4
+
5
+ Multiple warm-colored overlays wash across frame. Needs: a flat warm tint layer + 2-3 bright radial gradient divs, all larger than the frame so edges are never visible.
6
+
7
+ ```js
8
+ // Warm tint washes over entire frame
9
+ tl.to("#leak-warm", { opacity: 0.4, duration: 0.3, ease: "power1.in" }, T);
10
+ // Bright leak elements drift in
11
+ tl.to("#leak-1", { opacity: 0.9, x: 300, duration: 0.5, ease: "sine.inOut" }, T + 0.05);
12
+ tl.to("#leak-2", { opacity: 0.8, x: 200, duration: 0.6, ease: "sine.inOut" }, T + 0.1);
13
+ // Peak warmth then swap
14
+ tl.to("#leak-warm", { opacity: 0.6, duration: 0.15, ease: "power2.in" }, T + 0.35);
15
+ tl.set(old, { opacity: 0 }, T + 0.45);
16
+ tl.set(new, { opacity: 1 }, T + 0.45);
17
+ // Leak fades
18
+ tl.to("#leak-warm", { opacity: 0, duration: 0.4, ease: "power2.out" }, T + 0.5);
19
+ tl.to("#leak-1", { opacity: 0, x: 600, duration: 0.35, ease: "power1.out" }, T + 0.5);
20
+ ```
21
+
22
+ ### Overexposure Burn
23
+
24
+ Scene progressively blows out to white using CSS `filter: brightness()`, then white overlay fades in. Swap at peak white. White recedes to reveal new scene.
25
+
26
+ ```js
27
+ tl.to(old, { filter: "brightness(1.5)", scale: 1.03, duration: 0.2, ease: "power1.in" }, T);
28
+ tl.to(old, { filter: "brightness(3)", scale: 1.06, duration: 0.2, ease: "power2.in" }, T + 0.2);
29
+ tl.to("#flash-overlay", { opacity: 0.5, duration: 0.25, ease: "power1.in" }, T + 0.15);
30
+ tl.to("#flash-overlay", { opacity: 1, duration: 0.15, ease: "power2.in" }, T + 0.4);
31
+ tl.set(old, { opacity: 0, filter: "brightness(1)", scale: 1 }, T + 0.55);
32
+ tl.set(new, { opacity: 1 }, T + 0.55);
33
+ tl.to("#flash-overlay", { opacity: 0, duration: 0.35, ease: "power2.out" }, T + 0.55);
34
+ ```
35
+
36
+ ### Film Burn
37
+
38
+ Staggered warm overlays (amber, orange, red) bleed from one edge. Each overlay is a large radial gradient div at high z-index.
39
+
40
+ ```js
41
+ tl.to("#burn-a", { opacity: 1, x: -300, duration: 0.4, ease: "power1.in" }, T);
42
+ tl.to("#burn-b", { opacity: 1, x: -500, duration: 0.5, ease: "power1.in" }, T + 0.05);
43
+ tl.to("#burn-c", { opacity: 1, x: -200, duration: 0.45, ease: "power1.in" }, T + 0.1);
44
+ tl.set(old, { opacity: 0 }, T + 0.35);
45
+ tl.set(new, { opacity: 1 }, T + 0.35);
46
+ tl.to("#burn-a", { opacity: 0, duration: 0.3, ease: "power2.out" }, T + 0.45);
47
+ tl.to("#burn-b", { opacity: 0, duration: 0.3, ease: "power2.out" }, T + 0.5);
48
+ tl.to("#burn-c", { opacity: 0, duration: 0.3, ease: "power2.out" }, T + 0.55);
49
+ ```
@@ -0,0 +1,30 @@
1
+ ## Mechanical
2
+
3
+ ### Shutter
4
+
5
+ Two full-screen halves close from top and bottom, meet in the middle. Swap while closed. Open again.
6
+
7
+ ```js
8
+ tl.to("#shutter-top", { y: 0, duration: 0.25, ease: "power3.in" }, T);
9
+ tl.to("#shutter-bot", { y: 0, duration: 0.25, ease: "power3.in" }, T);
10
+ tl.set(old, { opacity: 0 }, T + 0.25);
11
+ tl.set(new, { opacity: 1 }, T + 0.25);
12
+ tl.to("#shutter-top", { y: -540, duration: 0.25, ease: "power3.out" }, T + 0.3);
13
+ tl.to("#shutter-bot", { y: 540, duration: 0.25, ease: "power3.out" }, T + 0.3);
14
+ ```
15
+
16
+ ### Clock Wipe
17
+
18
+ Radial polygon sweep stepping through quadrants. Use 9-point polygon with intermediate edge positions for smooth sweep.
19
+
20
+ ```js
21
+ tl.set(new, { opacity: 1, zIndex: 10 }, T);
22
+ var d = 0.1; // duration per quadrant
23
+ tl.set(new, { clipPath: "polygon(50% 50%, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%, 50% 0%)" }, T);
24
+ tl.to(new, { clipPath: "polygon(50% 50%, 50% 0%, 100% 0%, 100% 50%, 100% 50%, 100% 50%, 100% 50%, 100% 50%, 100% 50%)", duration: d, ease: "none" }, T);
25
+ tl.to(new, { clipPath: "polygon(50% 50%, 50% 0%, 100% 0%, 100% 50%, 100% 100%, 50% 100%, 50% 100%, 50% 100%, 50% 100%)", duration: d, ease: "none" }, T + d);
26
+ tl.to(new, { clipPath: "polygon(50% 50%, 50% 0%, 100% 0%, 100% 50%, 100% 100%, 50% 100%, 0% 100%, 0% 50%, 0% 50%)", duration: d, ease: "none" }, T + d*2);
27
+ tl.to(new, { clipPath: "polygon(50% 50%, 50% 0%, 100% 0%, 100% 50%, 100% 100%, 50% 100%, 0% 100%, 0% 50%, 0% 0%)", duration: d, ease: "none" }, T + d*3);
28
+ tl.set(new, { clipPath: "none", zIndex: "auto" }, T + d*4 + 0.02);
29
+ tl.set(old, { opacity: 0, zIndex: "auto" }, T + d*4 + 0.02);
30
+ ```
@@ -0,0 +1,25 @@
1
+ ## Other
2
+
3
+ ### Gravity Drop
4
+
5
+ Old scene falls down with slight rotation. New scene was behind it. Needs z-index.
6
+
7
+ ```js
8
+ tl.set(new, { opacity: 1, zIndex: 1 }, T);
9
+ tl.set(old, { zIndex: 10 }, T);
10
+ tl.to(old, { y: 1200, rotation: 4, duration: 0.5, ease: "power3.in" }, T);
11
+ tl.set(old, { opacity: 0, zIndex: "auto" }, T + 0.5);
12
+ tl.set(new, { zIndex: "auto" }, T + 0.5);
13
+ ```
14
+
15
+ ### Morph Circle
16
+
17
+ A circle scales up from center to fill frame (becoming the new scene's background color). New scene content fades in on top.
18
+
19
+ ```js
20
+ tl.set("#morph-circle", { background: newBgColor, opacity: 1, scale: 0 }, T);
21
+ tl.to("#morph-circle", { scale: 30, duration: 0.5, ease: "power3.in" }, T);
22
+ tl.set(old, { opacity: 0 }, T + 0.4);
23
+ tl.set(new, { opacity: 1 }, T + 0.4);
24
+ tl.to("#morph-circle", { opacity: 0, duration: 0.15, ease: "power2.out" }, T + 0.5);
25
+ ```
@@ -0,0 +1,41 @@
1
+ ## Linear / Push
2
+
3
+ ### Push Slide
4
+
5
+ Both scenes move together — new pushes old out.
6
+
7
+ ```js
8
+ tl.to(old, { x: -1920, duration: 0.5, ease: "power3.inOut" }, T);
9
+ tl.fromTo(new, { x: 1920, opacity: 1 }, { x: 0, duration: 0.5, ease: "power3.inOut" }, T);
10
+ ```
11
+
12
+ ### Vertical Push
13
+
14
+ Same as push slide but vertical.
15
+
16
+ ```js
17
+ tl.to(old, { y: -1080, duration: 0.5, ease: "power3.inOut" }, T);
18
+ tl.fromTo(new, { y: 1080, opacity: 1 }, { y: 0, duration: 0.5, ease: "power3.inOut" }, T);
19
+ ```
20
+
21
+ ### Elastic Push
22
+
23
+ Push with overshoot bounce on the incoming scene.
24
+
25
+ ```js
26
+ tl.to(old, { x: -1920, duration: 0.5, ease: "power3.in" }, T);
27
+ tl.fromTo(new, { x: 1920, opacity: 1 }, { x: 30, duration: 0.4, ease: "power4.out" }, T + 0.1);
28
+ tl.to(new, { x: -15, duration: 0.15, ease: "sine.inOut" }, T + 0.5);
29
+ tl.to(new, { x: 0, duration: 0.1, ease: "sine.out" }, T + 0.65);
30
+ ```
31
+
32
+ ### Squeeze
33
+
34
+ Old compresses, new expands from opposite side.
35
+
36
+ ```js
37
+ tl.to(old, { scaleX: 0, transformOrigin: "left center", duration: 0.4, ease: "power3.inOut" }, T);
38
+ tl.fromTo(new, { scaleX: 0, transformOrigin: "right center", opacity: 1 },
39
+ { scaleX: 1, duration: 0.4, ease: "power3.inOut" }, T + 0.1);
40
+ tl.set(old, { opacity: 0 }, T + 0.5);
41
+ ```
@@ -0,0 +1,37 @@
1
+ ## Radial / Shape
2
+
3
+ ### Circle Iris
4
+
5
+ Expanding circle from center reveals new scene.
6
+
7
+ ```js
8
+ tl.set(new, { opacity: 1 }, T);
9
+ tl.fromTo(new,
10
+ { clipPath: "circle(0% at 50% 50%)" },
11
+ { clipPath: "circle(75% at 50% 50%)", duration: 0.5, ease: "power2.out" }, T);
12
+ tl.set(old, { opacity: 0 }, T + 0.5);
13
+ ```
14
+
15
+ ### Diamond Iris
16
+
17
+ Expanding diamond shape from center.
18
+
19
+ ```js
20
+ tl.set(new, { opacity: 1 }, T);
21
+ tl.fromTo(new,
22
+ { clipPath: "polygon(50% 50%, 50% 50%, 50% 50%, 50% 50%)" },
23
+ { clipPath: "polygon(50% -20%, 120% 50%, 50% 120%, -20% 50%)", duration: 0.5, ease: "power2.out" }, T);
24
+ tl.set(old, { opacity: 0 }, T + 0.5);
25
+ ```
26
+
27
+ ### Diagonal Split
28
+
29
+ Old scene shrinks to a triangle in one corner.
30
+
31
+ ```js
32
+ tl.set(new, { opacity: 1, zIndex: 1 }, T);
33
+ tl.set(old, { zIndex: 10, clipPath: "polygon(0% 0%, 100% 0%, 100% 100%, 0% 100%)" }, T);
34
+ tl.to(old, { clipPath: "polygon(60% 0%, 100% 0%, 100% 40%, 60% 0%)", duration: 0.5, ease: "power3.inOut" }, T);
35
+ tl.set(old, { opacity: 0, zIndex: "auto", clipPath: "none" }, T + 0.5);
36
+ tl.set(new, { zIndex: "auto" }, T + 0.5);
37
+ ```
@@ -0,0 +1,24 @@
1
+ ## Scale / Zoom
2
+
3
+ ### Zoom Through
4
+
5
+ Old zooms past camera + blurs, new zooms in from behind.
6
+
7
+ ```js
8
+ tl.to(old, { scale: 2.5, opacity: 0, filter: "blur(8px)", duration: 0.4, ease: "power3.in" }, T);
9
+ tl.fromTo(new,
10
+ { scale: 0.5, opacity: 0, filter: "blur(8px)" },
11
+ { scale: 1, opacity: 1, filter: "blur(0px)", duration: 0.4, ease: "power3.out" }, T + 0.15);
12
+ ```
13
+
14
+ ### Zoom Out
15
+
16
+ Old shrinks away, new was behind it. Needs z-index management.
17
+
18
+ ```js
19
+ tl.set(new, { opacity: 1, zIndex: 1 }, T);
20
+ tl.set(old, { zIndex: 10, transformOrigin: "50% 50%" }, T);
21
+ tl.to(old, { scale: 0.3, opacity: 0, duration: 0.4, ease: "power3.in" }, T);
22
+ tl.set(old, { zIndex: "auto" }, T + 0.4);
23
+ tl.set(new, { zIndex: "auto" }, T + 0.4);
24
+ ```
@@ -0,0 +1,112 @@
1
+ # Scene Transitions
2
+
3
+ A transition tells the viewer how two scenes relate. A crossfade says "this continues." A push slide says "next point." A blur crossfade says "drift with me." Choose transitions that match what the content is doing emotionally, not just technically.
4
+
5
+ ## Animation Rules for Multi-Scene Compositions
6
+
7
+ These are non-negotiable for every multi-scene composition:
8
+
9
+ 1. **Every composition uses transitions.** No exceptions. Scenes without transitions feel like jump cuts.
10
+ 2. **Every scene uses entrance animations.** Elements animate IN via `gsap.from()` — opacity, position, scale, etc. No scene should pop fully-formed onto screen.
11
+ 3. **Exit animations are BANNED** except on the final scene. Do NOT use `gsap.to()` to animate elements out before a transition fires. The transition IS the exit. Outgoing scene content must be fully visible when the transition starts — the transition handles the visual handoff.
12
+ 4. **Final scene exception:** The last scene MAY fade elements out (e.g., fade to black at the end of the composition). This is the only scene where exit animations are allowed.
13
+
14
+ ## Energy → Primary Transition
15
+
16
+ | Energy | CSS Primary | Shader Primary | Accent | Duration | Easing |
17
+ | ---------------------------------------- | ---------------------------- | ------------------------------------ | ------------------------------ | --------- | ---------------------- |
18
+ | **Calm** (wellness, brand story, luxury) | Blur crossfade, focus pull | Cross-warp morph, thermal distortion | Light leak, circle iris | 0.5-0.8s | `sine.inOut`, `power1` |
19
+ | **Medium** (corporate, SaaS, explainer) | Push slide, staggered blocks | Whip pan, cinematic zoom | Squeeze, vertical push | 0.3-0.5s | `power2`, `power3` |
20
+ | **High** (promos, sports, music, launch) | Zoom through, overexposure | Ridged burn, glitch, chromatic split | Staggered blocks, gravity drop | 0.15-0.3s | `power4`, `expo` |
21
+
22
+ Pick ONE primary (60-70% of scene changes) + 1-2 accents. Never use a different transition for every scene.
23
+
24
+ ## Mood → Transition Type
25
+
26
+ Think about what the transition _communicates_, not just what it looks like.
27
+
28
+ | Mood | Transitions | Why it works |
29
+ | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------- |
30
+ | **Warm / inviting** | Light leak, blur crossfade, focus pull, film burn · **Shader:** thermal distortion, light leak, cross-warp morph | Soft edges, warm color washes. Nothing sharp or mechanical. |
31
+ | **Cold / clinical** | Squeeze, zoom out, blinds, shutter, grid dissolve · **Shader:** gravitational lens | Content transforms mechanically — compressed, shrunk, sliced, gridded. |
32
+ | **Editorial / magazine** | Push slide, vertical push, diagonal split, shutter · **Shader:** whip pan | Like turning a page or slicing a layout. Clean directional movement. |
33
+ | **Tech / futuristic** | Grid dissolve, staggered blocks, blinds, chromatic aberration · **Shader:** glitch, chromatic split | Grid dissolve is the core "data" transition. Shader glitch adds posterization + scan lines. |
34
+ | **Tense / edgy** | Glitch, VHS, chromatic aberration, ripple · **Shader:** ridged burn, glitch, domain warp | Instability, distortion, digital breakdown. Ridged burn adds sharp lightning-crack edges. |
35
+ | **Playful / fun** | Elastic push, 3D flip, circle iris, morph circle, clock wipe · **Shader:** ripple waves, swirl vortex | Overshoot, bounce, rotation, expansion. Swirl vortex adds organic spiral distortion. |
36
+ | **Dramatic / cinematic** | Zoom through, zoom out, gravity drop, overexposure, color dip to black · **Shader:** cinematic zoom, gravitational lens, domain warp | Scale, weight, light extremes. Shader transitions add per-pixel depth. |
37
+ | **Premium / luxury** | Focus pull, blur crossfade, color dip to black · **Shader:** cross-warp morph, thermal distortion | Restraint. Cross-warp morph flows both scenes into each other organically. |
38
+ | **Retro / analog** | Film burn, light leak, VHS, clock wipe · **Shader:** light leak | Organic imperfection. Warm color bleeds, scan line displacement. |
39
+
40
+ ## Narrative Position
41
+
42
+ | Position | Use | Why |
43
+ | -------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------- |
44
+ | **Opening** | Your most distinctive transition. Match the mood. 0.4-0.6s | Sets the visual language for the entire piece. |
45
+ | **Between related points** | Your primary transition. Consistent. 0.3s | Don't distract — the content is continuing. |
46
+ | **Topic change** | Something different from your primary. Staggered blocks, shutter, squeeze. | Signals "new section" — the viewer's brain resets. |
47
+ | **Climax / hero reveal** | Your boldest accent. Fastest or most dramatic. | This is the payoff — spend your best transition here. |
48
+ | **Wind-down** | Return to gentle. Blur crossfade, crossfade. 0.5-0.7s | Let the viewer exhale after the climax. |
49
+ | **Outro** | Slowest, simplest. Crossfade, color dip to black. 0.6-1.0s | Closure. Don't introduce new energy at the end. |
50
+
51
+ ## Blur Intensity by Energy
52
+
53
+ | Energy | Blur | Duration | Hold at peak |
54
+ | ---------- | ------- | -------- | ------------ |
55
+ | **Calm** | 20-30px | 0.8-1.2s | 0.3-0.5s |
56
+ | **Medium** | 8-15px | 0.4-0.6s | 0.1-0.2s |
57
+ | **High** | 3-6px | 0.2-0.3s | 0s |
58
+
59
+ ## Presets
60
+
61
+ | Preset | Duration | Easing |
62
+ | ---------- | -------- | ----------------- |
63
+ | `snappy` | 0.2s | `power4.inOut` |
64
+ | `smooth` | 0.4s | `power2.inOut` |
65
+ | `gentle` | 0.6s | `sine.inOut` |
66
+ | `dramatic` | 0.5s | `power3.in` → out |
67
+ | `instant` | 0.15s | `expo.inOut` |
68
+ | `luxe` | 0.7s | `power1.inOut` |
69
+
70
+ ## Implementation
71
+
72
+ Read [transitions/catalog.md](transitions/catalog.md) for GSAP code and hard rules for every transition type.
73
+
74
+ | Category | CSS | Shader (WebGL) |
75
+ | ----------- | -------------------------------------------------------------- | ------------------------------------------------------------------------- |
76
+ | Push/slide | Push slide, vertical push, elastic push, squeeze | Whip pan |
77
+ | Scale/zoom | Zoom through, zoom out, gravity drop, 3D flip | Cinematic zoom, gravitational lens |
78
+ | Reveal/mask | Circle iris, diamond iris, diagonal split, clock wipe, shutter | SDF iris |
79
+ | Dissolve | Crossfade, blur crossfade, focus pull, color dip | Cross-warp morph, domain warp |
80
+ | Cover | Staggered blocks, horizontal blinds, vertical blinds | — |
81
+ | Light | Light leak, overexposure burn, film burn | Light leak (shader), thermal distortion |
82
+ | Distortion | Glitch, chromatic aberration, ripple, VHS tape | Glitch (shader), chromatic split, ridged burn, ripple waves, swirl vortex |
83
+ | Pattern | Grid dissolve, morph circle | — |
84
+
85
+ ## Transitions That Don't Work in CSS
86
+
87
+ Avoid: star iris, tilt-shift, lens flare, hinge/door. See catalog.md for why.
88
+
89
+ ## CSS vs Shader
90
+
91
+ CSS transitions animate scene containers with opacity, transforms, clip-path, and filters. Shader transitions composite both scene textures per-pixel on a WebGL canvas — they can warp, dissolve, and morph in ways CSS cannot.
92
+
93
+ **Both are first-class options.** Shaders are provided by the `@hyperframes/shader-transitions` package — import from the package instead of writing raw GLSL. CSS transitions are simpler to set up. Choose based on the effect you want, not based on which is easier.
94
+
95
+ When a composition uses shader transitions, ALL transitions in that composition should be shader-based (the WebGL canvas replaces DOM-based scene switching). Don't mix CSS and shader transitions in the same composition.
96
+
97
+ ## Shader-Compatible CSS Rules
98
+
99
+ Shader transitions capture DOM scenes to WebGL textures via html2canvas. The canvas 2D rendering pipeline doesn't match CSS exactly. Follow these rules to avoid visible artifacts at transition boundaries:
100
+
101
+ 1. **No `transparent` keyword in gradients.** Canvas interpolates `transparent` as `rgba(0,0,0,0)` (black at zero alpha), creating dark fringes. Always use the target color at zero alpha: `rgba(200,117,51,0)` not `transparent`.
102
+ 2. **No gradient backgrounds on elements thinner than 4px.** Canvas can't match CSS gradient rendering on 1-2px elements. Use solid `background-color` on thin accent lines.
103
+ 3. **No CSS variables (`var()`) on elements visible during capture.** html2canvas doesn't reliably resolve custom properties. Use literal color values in inline styles.
104
+ 4. **Mark uncapturable decorative elements with `data-no-capture`.** The capture function skips these. They're present on the live DOM but absent from the shader texture. Use for elements that can't follow the rules above.
105
+ 5. **No gradient opacity below 0.15.** Gradient elements below 10% opacity render differently in canvas vs CSS. Increase to 0.15+ or use a solid color at equivalent brightness.
106
+ 6. **Every `.scene` div must have explicit `background-color`, AND pass the same color as `bgColor` in the `init()` config.** The package captures scene elements via html2canvas. Both the CSS `background-color` on `.scene` and the `bgColor` config must match. Without either, the texture renders as black.
107
+
108
+ These rules only apply to shader transition compositions. CSS-only compositions have no restrictions.
109
+
110
+ ## Visual Pattern Warning
111
+
112
+ Avoid transitions that create visible repeating geometric patterns — grids of tiles, hexagonal cells, uniform dot arrays, evenly-spaced blob circles. These look cheap and artificial regardless of the math behind them. Organic noise (FBM, domain warping) is good because it's irregular. Geometric repetition is bad because the eye instantly sees the grid.
@@ -0,0 +1,75 @@
1
+ # Text-to-Speech
2
+
3
+ Generate speech audio locally using Kokoro-82M (no API key, runs on CPU).
4
+
5
+ ## Voice Selection
6
+
7
+ Match voice to content. Default is `af_heart`.
8
+
9
+ | Content type | Voice | Why |
10
+ | ------------- | --------------------- | -------------------------- |
11
+ | Product demo | `af_heart`/`af_nova` | Warm, professional |
12
+ | Tutorial | `am_adam`/`bf_emma` | Neutral, easy to follow |
13
+ | Marketing | `af_sky`/`am_michael` | Energetic or authoritative |
14
+ | Documentation | `bf_emma`/`bm_george` | Clear British English |
15
+ | Casual | `af_heart`/`af_sky` | Approachable, natural |
16
+
17
+ Run `npx hyperframes tts --list` for all 54 voices (8 languages).
18
+
19
+ ## Multilingual Phonemization
20
+
21
+ Kokoro voice IDs encode language in the first letter: `a`=American English, `b`=British English, `e`=Spanish, `f`=French, `h`=Hindi, `i`=Italian, `j`=Japanese, `p`=Brazilian Portuguese, `z`=Mandarin. The CLI auto-detects the phonemizer locale from that prefix — you don't need to pass `--lang` when the voice matches the text.
22
+
23
+ ```bash
24
+ npx hyperframes tts "La reunión empieza a las nueve" --voice ef_dora --output es.wav
25
+ npx hyperframes tts "今日はいい天気ですね" --voice jf_alpha --output ja.wav
26
+ ```
27
+
28
+ Use `--lang` only to override auto-detection (e.g. stylized accents):
29
+
30
+ ```bash
31
+ npx hyperframes tts "Hello there" --voice af_heart --lang fr-fr --output accented.wav
32
+ ```
33
+
34
+ Valid `--lang` codes: `en-us`, `en-gb`, `es`, `fr-fr`, `hi`, `it`, `pt-br`, `ja`, `zh`.
35
+
36
+ Non-English phonemization requires `espeak-ng` installed system-wide (`brew install espeak-ng` on macOS, `apt-get install espeak-ng` on Debian/Ubuntu).
37
+
38
+ ## Speed Tuning
39
+
40
+ - **0.7-0.8** — Tutorial, complex content
41
+ - **1.0** — Natural pace (default)
42
+ - **1.1-1.2** — Intros, upbeat content
43
+ - **1.5+** — Rarely appropriate
44
+
45
+ ## Usage
46
+
47
+ ```bash
48
+ npx hyperframes tts "Your script here" --voice af_nova --output narration.wav
49
+ npx hyperframes tts script.txt --voice bf_emma --output narration.wav
50
+ ```
51
+
52
+ In compositions:
53
+
54
+ ```html
55
+ <audio
56
+ id="narration"
57
+ data-start="0"
58
+ data-duration="auto"
59
+ data-track-index="2"
60
+ src="narration.wav"
61
+ data-volume="1"
62
+ ></audio>
63
+ ```
64
+
65
+ ## TTS + Captions Workflow
66
+
67
+ ```bash
68
+ npx hyperframes tts script.txt --voice af_heart --output narration.wav
69
+ npx hyperframes transcribe narration.wav # → transcript.json with word-level timestamps
70
+ ```
71
+
72
+ ## Requirements
73
+
74
+ - Python 3.8+ with `kokoro-onnx` and `soundfile`
75
+ - Model downloads on first use (~311 MB + ~27 MB voices, cached in `~/.cache/hyperframes/tts/`)