Write HTML. Render video. Built for agents.
JavaScript aiai-agentsanimationclaude-codeffmpegframeworkgsaphtmlhtml-to-videomcpmotion-graphicspuppeteerrenderingtypescriptvideo-editor
fix(skills): mount music-to-video motion primitives as sub-compositions (#4136)
Miguel Ángelf2976536deb7
diff --git a/registry/examples/play-mode/index.html b/registry/examples/play-mode/index.htmlindex 1d0a91a769..aaf9ecb860 100644--- a/registry/examples/play-mode/index.html+++ b/registry/examples/play-mode/index.html@@ -200,6 +200,7 @@></div><divid="captions-comp"+ data-track-kind="captions"data-composition-id="captions"data-composition-src="compositions/captions.html"data-start="0"diff --git a/registry/examples/product-promo/index.html b/registry/examples/product-promo/index.htmlindex 938af4c522..1fb9e39fe7 100644--- a/registry/examples/product-promo/index.html+++ b/registry/examples/product-promo/index.html@@ -105,6 +105,7 @@<!-- Captions --><divid="captions-comp"+ data-track-kind="captions"data-composition-id="captions"data-start="1.5"data-duration="12.5"diff --git a/registry/examples/swiss-grid/index.html b/registry/examples/swiss-grid/index.htmlindex 98e26282b0..84911190e3 100644--- a/registry/examples/swiss-grid/index.html+++ b/registry/examples/swiss-grid/index.html@@ -112,6 +112,7 @@<!-- Captions Sub-composition --><divid="captions-comp"+ data-track-kind="captions"class="overlay-layer"data-composition-id="captions"data-composition-src="compositions/captions.html"diff --git a/registry/examples/vignelli/index.html b/registry/examples/vignelli/index.htmlindex 67222aa482..bfc989904a 100644--- a/registry/examples/vignelli/index.html+++ b/registry/examples/vignelli/index.html@@ -125,6 +125,7 @@<!-- Captions Composition --><divid="captions-comp"+ data-track-kind="captions"data-composition-id="captions"data-composition-src="compositions/captions.html"data-start="0"diff --git a/registry/examples/warm-grain/index.html b/registry/examples/warm-grain/index.htmlindex 5c1d23c263..b3433877f2 100644--- a/registry/examples/warm-grain/index.html+++ b/registry/examples/warm-grain/index.html@@ -167,6 +167,7 @@<divid="captions-layer"+ data-track-kind="captions"class="comp-layer"data-composition-id="captions"data-composition-src="compositions/captions.html"diff --git a/skills-manifest.json b/skills-manifest.jsonindex 0a31f01331..1e00398a37 100644--- a/skills-manifest.json+++ b/skills-manifest.json@@ -58,8 +58,8 @@"files": 23},"music-to-video": {- "hash": "8feb5e48038f49bc",- "files": 132+ "hash": "7fad41aa135aea23",+ "files": 169},"pr-to-video": {"hash": "bbb3db51176b7e44",diff --git a/skills/music-to-video/SKILL.md b/skills/music-to-video/SKILL.mdindex a2c78d31a8..adc5ff0da8 100644--- a/skills/music-to-video/SKILL.md+++ b/skills/music-to-video/SKILL.md@@ -202,7 +202,7 @@ music-to-video/references/ frame-skeleton.md · planning.md · storyboard-format.mdtemplate-catalog.md · motion-primitive-catalog.md · montage.mdtemplates/<id>/ { index.html (+ assets/ · program.json) } ← L1 catalog impls- motion-primitives/<id>/ { index.html } (+ ../assets/gsap.min.js shared by recipes) ← L0 catalog impls+ motion-primitives/<id>/ { index.html (mounts the scene), scene.html (the sub-composition) } (+ ../assets/gsap.min.js shared by recipes) ← L0 catalog implsscripts/ analyze-beatgrid.py · assemble-index.mjs · validate-plan.mjs · stage-assets.mjs · lib/storyboard.mjssub-agents/ frame-worker.md ← the one subagent (one per frame)```diff --git a/skills/music-to-video/references/motion-primitives/3d-card-flip/index.html b/skills/music-to-video/references/motion-primitives/3d-card-flip/index.htmlindex 0c4b88e3b9..982a432d25 100644--- a/skills/music-to-video/references/motion-primitives/3d-card-flip/index.html+++ b/skills/music-to-video/references/motion-primitives/3d-card-flip/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,72 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .card-stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- perspective: 2400px;- }- .card {- position: relative;- width: 1000px;- height: 580px;- transform-style: preserve-3d;- will-change: transform;- }- .face {- position: absolute;- inset: 0;- backface-visibility: hidden;- display: flex;- align-items: center;- justify-content: center;- font-weight: 900;- font-size: 200px;- letter-spacing: -0.04em;- border-radius: 24px;- box-shadow:- 0 40px 80px rgba(0, 0, 0, 0.5),- 0 0 0 1px rgba(255, 255, 255, 0.08) inset;- }- .face.front {- background: linear-gradient(135deg, #1e1b3a 0%, #0a0a0f 100%);- color: var(--hg-fg);- }- .face.back {- background: linear-gradient(135deg, #7c3aed 0%, #a855f7 60%, #d946ef 100%);- color: var(--hg-fg);- transform: rotateY(180deg);- }- .face .meta {- position: absolute;- top: 36px;- left: 40px;- font-family: "JetBrains Mono", monospace;- font-weight: 600;- font-size: 18px;- letter-spacing: 0.16em;- opacity: 0.6;- }- .card-shadow {- position: absolute;- left: 50%;- bottom: 22%;- width: 1000px;- height: 80px;- background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55) 0%, transparent 70%);- transform: translateX(-50%);- filter: blur(12px);- will-change: opacity, transform;- }</style></head><body>@@ -106,49 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="card-shadow"></div>- <div class="card-stage">- <div class="card" id="card">- <div class="face front">- <div class="meta">v4 · CURRENT</div>- PRODUCT- </div>- <div class="face back">- <div class="meta">v5 · LAUNCH</div>- v5.0- </div>- </div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="3d-card-flip"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- tl.fromTo(- "#card",- { rotateY: 0, scale: 0.92, opacity: 0 },- { rotateY: 0, scale: 1, opacity: 1, duration: 0.45, ease: "power3.out" },- 0.15,- );-- // Hold then flip- tl.to("#card", { rotateY: 180, duration: 1.0, ease: "power3.inOut" }, 0.7);-- // Shadow squishes mid-flip- tl.to(- ".card-shadow",- { scaleX: 0.6, opacity: 0.4, duration: 0.5, ease: "power2.inOut" },- 0.7,- );- tl.to(".card-shadow", { scaleX: 1, opacity: 0.7, duration: 0.5, ease: "power2.inOut" }, 1.2);-- // Tiny landing settle- tl.to("#card", { scale: 1.02, duration: 0.12, ease: "power2.out" }, 1.68);- tl.to("#card", { scale: 1, duration: 0.3, ease: "elastic.out(1, 0.5)" }, 1.8);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/3d-card-flip/scene.html b/skills/music-to-video/references/motion-primitives/3d-card-flip/scene.htmlnew file mode 100644index 0000000000..f9bce81e9a--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/3d-card-flip/scene.html@@ -0,0 +1,119 @@+<template id="3d-card-flip-template">+ <div data-composition-id="3d-card-flip" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .card-stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ perspective: 2400px;+ }+ .card {+ position: relative;+ width: 1000px;+ height: 580px;+ transform-style: preserve-3d;+ will-change: transform;+ }+ .face {+ position: absolute;+ inset: 0;+ backface-visibility: hidden;+ display: flex;+ align-items: center;+ justify-content: center;+ font-weight: 900;+ font-size: 200px;+ letter-spacing: -0.04em;+ border-radius: 24px;+ box-shadow:+ 0 40px 80px rgba(0, 0, 0, 0.5),+ 0 0 0 1px rgba(255, 255, 255, 0.08) inset;+ }+ .face.front {+ background: linear-gradient(135deg, #1e1b3a 0%, #0a0a0f 100%);+ color: var(--hg-fg);+ }+ .face.back {+ background: linear-gradient(135deg, #7c3aed 0%, #a855f7 60%, #d946ef 100%);+ color: var(--hg-fg);+ transform: rotateY(180deg);+ }+ .face .meta {+ position: absolute;+ top: 36px;+ left: 40px;+ font-family: "JetBrains Mono", monospace;+ font-weight: 600;+ font-size: 18px;+ letter-spacing: 0.16em;+ opacity: 0.6;+ }+ .card-shadow {+ position: absolute;+ left: 50%;+ bottom: 22%;+ width: 1000px;+ height: 80px;+ background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55) 0%, transparent 70%);+ transform: translateX(-50%);+ filter: blur(12px);+ will-change: opacity, transform;+ }+ </style>+ <div class="card-shadow"></div>+ <div class="card-stage">+ <div class="card" id="card">+ <div class="face front">+ <div class="meta">v4 · CURRENT</div>+ PRODUCT+ </div>+ <div class="face back">+ <div class="meta">v5 · LAUNCH</div>+ v5.0+ </div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.fromTo(+ "#card",+ { rotateY: 0, scale: 0.92, opacity: 0 },+ { rotateY: 0, scale: 1, opacity: 1, duration: 0.45, ease: "power3.out" },+ 0.15,+ );++ // Hold then flip+ tl.to("#card", { rotateY: 180, duration: 1.0, ease: "power3.inOut" }, 0.7);++ // Shadow squishes mid-flip+ tl.to(+ ".card-shadow",+ { scaleX: 0.6, opacity: 0.4, duration: 0.5, ease: "power2.inOut" },+ 0.7,+ );+ tl.to(".card-shadow", { scaleX: 1, opacity: 0.7, duration: 0.5, ease: "power2.inOut" }, 1.2);++ // Tiny landing settle+ tl.to("#card", { scale: 1.02, duration: 0.12, ease: "power2.out" }, 1.68);+ tl.to("#card", { scale: 1, duration: 0.3, ease: "elastic.out(1, 0.5)" }, 1.8);++ window.__timelines["3d-card-flip"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/bg-flow-field/index.html b/skills/music-to-video/references/motion-primitives/bg-flow-field/index.htmlindex 9a650cc8be..989a3f99da 100644--- a/skills/music-to-video/references/motion-primitives/bg-flow-field/index.html+++ b/skills/music-to-video/references/motion-primitives/bg-flow-field/index.html@@ -1,15 +1,5 @@<!doctype html>-<html- lang="en"- data-composition-variables='[- {"id":"bgColor", "type":"color", "label":"Page background", "default":"#050507"},- {"id":"colorLow", "type":"color", "label":"Flow — shadow tone", "default":"#0a1430"},- {"id":"colorMid", "type":"color", "label":"Flow — mid tone", "default":"#6a6f9e"},- {"id":"colorHigh", "type":"color", "label":"Flow — highlight tone", "default":"#e8f0ff"},- {"id":"accentColor","type":"color", "label":"Core / glow accent", "default":"#aee4ff"},- {"id":"flowSpeed", "type":"number", "label":"Flow speed", "default":1, "min":0.1, "max":3, "step":0.1}- ]'->+<html lang="en"><head><meta charset="UTF-8" /><meta name="viewport" content="width=1920, height=1080" />@@ -23,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -39,31 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .field {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- display: block;- }- .label {- position: absolute;- left: 48px;- bottom: 40px;- font-size: 22px;- font-weight: 600;- letter-spacing: 0.18em;- text-transform: uppercase;- color: rgba(255, 255, 255, 0.7);- mix-blend-mode: screen;- pointer-events: none;- }</style></head><body>@@ -75,252 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="4" data-track-index="1">- <canvas class="field" width="1920" height="1080"></canvas>- <div class="label">bg_flow_field</div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="bg-flow-field"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="4"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- // ── Variables (palette + speed); falls back to defaults standalone ──- const defaults = {- bgColor: "#050507",- colorLow: "#0a1430",- colorMid: "#6a6f9e",- colorHigh: "#e8f0ff",- accentColor: "#aee4ff",- flowSpeed: 1,- };- const vars = Object.assign(- {},- defaults,- window.__hyperframes && window.__hyperframes.getVariables- ? window.__hyperframes.getVariables()- : {},- );-- // sRGB hex -> linear-light [r,g,b] (shader works in linear, gamma-encodes at end)- function hexLin(hex) {- let h = String(hex).replace("#", "").trim();- if (h.length === 3) h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2];- const r = parseInt(h.substr(0, 2), 16) / 255;- const g = parseInt(h.substr(2, 2), 16) / 255;- const b = parseInt(h.substr(4, 2), 16) / 255;- const lin = (c) => Math.pow(c, 2.2);- return [lin(r), lin(g), lin(b)];- }-- const canvas = document.querySelector(".field");- const gl = canvas.getContext("webgl", {- antialias: false,- alpha: false,- preserveDrawingBuffer: true,- });-- const VERT = [- "attribute vec2 position;",- "varying vec2 vUv;",- "void main(){",- " vUv = position * 0.5 + 0.5;",- " gl_Position = vec4(position, 0.0, 1.0);",- "}",- ].join("\n");-- // Curl-noise flow field — ported verbatim from the held-message-living-field- // template's "living field" background. All visible state comes from uniforms.- const FRAG = [- "precision highp float;",- "varying vec2 vUv;",- "uniform float uTime;",- "uniform float uPhase;",- "uniform float uReveal;",- "uniform float uChromAb;",- "uniform float uVignette;",- "uniform float uIntensity;",- "uniform float uSpeed;",- "uniform vec2 uResolution;",- "uniform vec3 uColLow;",- "uniform vec3 uColMid;",- "uniform vec3 uColHigh;",- "uniform vec3 uAccent;",- "float hash21(vec2 p){",- " p = fract(p * vec2(123.34, 456.21));",- " p += dot(p, p + 45.32);",- " return fract(p.x * p.y);",- "}",- "float noise2(vec2 p){",- " vec2 i = floor(p);",- " vec2 f = fract(p);",- " vec2 u = f * f * (3.0 - 2.0 * f);",- " float a = hash21(i);",- " float b = hash21(i + vec2(1.0, 0.0));",- " float c = hash21(i + vec2(0.0, 1.0));",- " float d = hash21(i + vec2(1.0, 1.0));",- " return mix(mix(a,b,u.x), mix(c,d,u.x), u.y);",- "}",- "float fbm(vec2 p){",- " float v = 0.0;",- " float a = 0.5;",- " for(int i=0;i<5;i++){",- " v += a * noise2(p);",- " p *= 2.02;",- " a *= 0.5;",- " }",- " return v;",- "}",- "vec2 curl(vec2 p, float t){",- " float e = 0.6;",- " float n1 = fbm(p + vec2(0.0, e) + t*0.18);",- " float n2 = fbm(p + vec2(0.0, -e) + t*0.18);",- " float n3 = fbm(p + vec2( e, 0.0) + t*0.18);",- " float n4 = fbm(p + vec2(-e, 0.0) + t*0.18);",- " return vec2(n1 - n2, -(n3 - n4));",- "}",- "vec3 palette(float t){",- " t = clamp(t, 0.0, 1.0);",- " vec3 lowMid = mix(uColLow, uColMid, smoothstep(0.0, 0.5, t));",- " return mix(lowMid, uColHigh, smoothstep(0.5, 1.0, t));",- "}",- "vec3 sampleField(vec2 uv, float t, float energy){",- " vec2 p = (uv - 0.5) * vec2(uResolution.x/uResolution.y, 1.0) * 2.4;",- " vec2 c = curl(p * 0.9, t);",- " vec2 q = p + c * (0.45 + 0.55 * energy);",- " float flow = fbm(q * 1.6 + vec2(t * 0.11, -t * 0.07));",- " float bands = sin(flow * 14.0 + t * 1.1);",- " bands = smoothstep(0.0, 1.0, 0.5 + 0.5 * bands);",- " float r = length(p);",- " float core = smoothstep(1.5, 0.05, r) * (0.6 + 0.4 * energy);",- " float glow = exp(-r * 1.6) * (0.55 + 0.45 * energy);",- " float k = clamp(flow * 0.85 + 0.15 * bands + 0.25 * core + 0.6 * glow, 0.0, 1.4);",- " vec3 col = palette(k * 0.9 + 0.1 * sin(t * 0.4));",- " col *= 0.7 + 0.6 * energy;",- " col += uAccent * core * 0.55;",- " return col;",- "}",- "void main(){",- " vec2 uv = vUv;",- " float t = uTime * uSpeed;",- " float e = uIntensity;",- " vec2 dir = normalize(uv - 0.5 + 1e-6);",- " float ca = uChromAb * (0.004 + 0.012 * length(uv - 0.5));",- " vec3 cR = sampleField(uv + dir * ca, t, e);",- " vec3 cG = sampleField(uv, t, e);",- " vec3 cB = sampleField(uv - dir * ca, t, e);",- " vec3 col = vec3(cR.r, cG.g, cB.b);",- " float lum = dot(col, vec3(0.299, 0.587, 0.114));",- " col = mix(vec3(lum), col, 1.05);",- " float rev = uReveal;",- " float sweep = smoothstep(0.0, 0.6, rev) * (1.0 - smoothstep(0.6, 1.0, rev));",- " col += uColHigh * sweep * 0.35;",- " vec3 phaseTint = mix(vec3(0.85, 0.92, 1.05), vec3(1.05, 0.95, 0.85), uPhase);",- " col *= phaseTint;",- " float v = length(uv - 0.5);",- " col *= 1.0 - smoothstep(0.45, 0.95, v) * uVignette;",- " col = col / (col + 1.0);",- " col = pow(col, vec3(1.0/2.2));",- " gl_FragColor = vec4(col, 1.0);",- "}",- ].join("\n");-- function compile(type, src) {- const s = gl.createShader(type);- gl.shaderSource(s, src);- gl.compileShader(s);- return s;- }- const prog = gl.createProgram();- gl.attachShader(prog, compile(gl.VERTEX_SHADER, VERT));- gl.attachShader(prog, compile(gl.FRAGMENT_SHADER, FRAG));- gl.linkProgram(prog);- gl.useProgram(prog);-- // full-screen triangle- const buf = gl.createBuffer();- gl.bindBuffer(gl.ARRAY_BUFFER, buf);- gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 3, -1, -1, 3]), gl.STATIC_DRAW);- const posLoc = gl.getAttribLocation(prog, "position");- gl.enableVertexAttribArray(posLoc);- gl.vertexAttribPointer(posLoc, 2, gl.FLOAT, false, 0, 0);- gl.viewport(0, 0, 1920, 1080);-- const L = (n) => gl.getUniformLocation(prog, n);- const uLoc = {- uTime: L("uTime"),- uPhase: L("uPhase"),- uReveal: L("uReveal"),- uChromAb: L("uChromAb"),- uVignette: L("uVignette"),- uIntensity: L("uIntensity"),- uSpeed: L("uSpeed"),- uResolution: L("uResolution"),- uColLow: L("uColLow"),- uColMid: L("uColMid"),- uColHigh: L("uColHigh"),- uAccent: L("uAccent"),- };-- // animated uniform state (GSAP tweens these .value fields)- const u = {- uTime: { value: 0 },- uPhase: { value: 0.1 },- uReveal: { value: 0 },- uChromAb: { value: 0 },- uVignette: { value: 0 },- uIntensity: { value: 0.3 },- };- const speed = Number(vars.flowSpeed) || 1;- const cLow = hexLin(vars.colorLow);- const cMid = hexLin(vars.colorMid);- const cHigh = hexLin(vars.colorHigh);- const cAcc = hexLin(vars.accentColor);-- function render() {- gl.uniform1f(uLoc.uTime, u.uTime.value);- gl.uniform1f(uLoc.uPhase, u.uPhase.value);- gl.uniform1f(uLoc.uReveal, u.uReveal.value);- gl.uniform1f(uLoc.uChromAb, u.uChromAb.value);- gl.uniform1f(uLoc.uVignette, u.uVignette.value);- gl.uniform1f(uLoc.uIntensity, u.uIntensity.value);- gl.uniform1f(uLoc.uSpeed, speed);- gl.uniform2f(uLoc.uResolution, 1920, 1080);- gl.uniform3fv(uLoc.uColLow, cLow);- gl.uniform3fv(uLoc.uColMid, cMid);- gl.uniform3fv(uLoc.uColHigh, cHigh);- gl.uniform3fv(uLoc.uAccent, cAcc);- gl.drawArrays(gl.TRIANGLES, 0, 3);- }- render(); // initial frame so a seek to 0 / first paint is correct-- // ── Energy-envelope drive (the "living field" breath): all repaint is via- // onUpdate, so the field is fully determined by the timeline position — no- // requestAnimationFrame, seek-safe. ──- tl.eventCallback("onUpdate", render);-- tl.to(u.uTime, { value: 4, duration: 4, ease: "none" }, 0);-- // energy: settle-in → breathe → SURGE → settle dark for the hold- tl.to(u.uIntensity, { value: 0.6, duration: 1.2, ease: "sine.inOut" }, 0);- tl.to(u.uIntensity, { value: 1.0, duration: 0.7, ease: "power2.in" }, 1.3);- tl.to(u.uIntensity, { value: 0.35, duration: 2.0, ease: "power2.out" }, 2.0);-- // chromatic light-leak: light at entry, spikes on the surge, then settles- tl.fromTo(u.uChromAb, { value: 0 }, { value: 0.4, duration: 1.2, ease: "sine.in" }, 0);- tl.to(u.uChromAb, { value: 1.4, duration: 0.5, ease: "power3.in" }, 1.4);- tl.to(u.uChromAb, { value: 0.2, duration: 1.6, ease: "power2.out" }, 1.9);-- // a brief highlight sweep across the surge- tl.fromTo(u.uReveal, { value: 0 }, { value: 1, duration: 0.7, ease: "none" }, 1.3);- tl.set(u.uReveal, { value: 0 }, 2.0);-- // colour-temperature drift- tl.to(u.uPhase, { value: 0.6, duration: 2.2, ease: "sine.inOut" }, 0.6);-- // black mask settles the field to near-black + central glow for the hold- tl.to(u.uVignette, { value: 0.85, duration: 1.6, ease: "power2.out" }, 1.9);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/bg-flow-field/scene.html b/skills/music-to-video/references/motion-primitives/bg-flow-field/scene.htmlnew file mode 100644index 0000000000..91a1ad178a--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/bg-flow-field/scene.html@@ -0,0 +1,294 @@+<template id="bg-flow-field-template">+ <div+ data-composition-id="bg-flow-field"+ data-composition-variables='[+ {"id":"bgColor", "type":"color", "label":"Page background", "default":"#050507"},+ {"id":"colorLow", "type":"color", "label":"Flow — shadow tone", "default":"#0a1430"},+ {"id":"colorMid", "type":"color", "label":"Flow — mid tone", "default":"#6a6f9e"},+ {"id":"colorHigh", "type":"color", "label":"Flow — highlight tone", "default":"#e8f0ff"},+ {"id":"accentColor","type":"color", "label":"Core / glow accent", "default":"#aee4ff"},+ {"id":"flowSpeed", "type":"number", "label":"Flow speed", "default":1, "min":0.1, "max":3, "step":0.1}+ ]'+ data-width="1920"+ data-height="1080"+ data-duration="4"+ >+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #050507;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .field {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ display: block;+ }+ .label {+ position: absolute;+ left: 48px;+ bottom: 40px;+ font-size: 22px;+ font-weight: 600;+ letter-spacing: 0.18em;+ text-transform: uppercase;+ color: rgba(255, 255, 255, 0.7);+ mix-blend-mode: screen;+ pointer-events: none;+ }+ </style>+ <canvas class="field" width="1920" height="1080"></canvas>+ <div class="label">bg_flow_field</div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // ── Variables (palette + speed); falls back to defaults standalone ──+ const defaults = {+ bgColor: "#050507",+ colorLow: "#0a1430",+ colorMid: "#6a6f9e",+ colorHigh: "#e8f0ff",+ accentColor: "#aee4ff",+ flowSpeed: 1,+ };+ const vars = Object.assign(+ {},+ defaults,+ window.__hyperframes && window.__hyperframes.getVariables+ ? window.__hyperframes.getVariables()+ : {},+ );++ // sRGB hex -> linear-light [r,g,b] (shader works in linear, gamma-encodes at end)+ function hexLin(hex) {+ let h = String(hex).replace("#", "").trim();+ if (h.length === 3) h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2];+ const r = parseInt(h.substr(0, 2), 16) / 255;+ const g = parseInt(h.substr(2, 2), 16) / 255;+ const b = parseInt(h.substr(4, 2), 16) / 255;+ const lin = (c) => Math.pow(c, 2.2);+ return [lin(r), lin(g), lin(b)];+ }++ const canvas = document.querySelector(".field");+ const gl = canvas.getContext("webgl", {+ antialias: false,+ alpha: false,+ preserveDrawingBuffer: true,+ });++ const VERT = [+ "attribute vec2 position;",+ "varying vec2 vUv;",+ "void main(){",+ " vUv = position * 0.5 + 0.5;",+ " gl_Position = vec4(position, 0.0, 1.0);",+ "}",+ ].join("\n");++ // Curl-noise flow field — ported verbatim from the held-message-living-field+ // template's "living field" background. All visible state comes from uniforms.+ const FRAG = [+ "precision highp float;",+ "varying vec2 vUv;",+ "uniform float uTime;",+ "uniform float uPhase;",+ "uniform float uReveal;",+ "uniform float uChromAb;",+ "uniform float uVignette;",+ "uniform float uIntensity;",+ "uniform float uSpeed;",+ "uniform vec2 uResolution;",+ "uniform vec3 uColLow;",+ "uniform vec3 uColMid;",+ "uniform vec3 uColHigh;",+ "uniform vec3 uAccent;",+ "float hash21(vec2 p){",+ " p = fract(p * vec2(123.34, 456.21));",+ " p += dot(p, p + 45.32);",+ " return fract(p.x * p.y);",+ "}",+ "float noise2(vec2 p){",+ " vec2 i = floor(p);",+ " vec2 f = fract(p);",+ " vec2 u = f * f * (3.0 - 2.0 * f);",+ " float a = hash21(i);",+ " float b = hash21(i + vec2(1.0, 0.0));",+ " float c = hash21(i + vec2(0.0, 1.0));",+ " float d = hash21(i + vec2(1.0, 1.0));",+ " return mix(mix(a,b,u.x), mix(c,d,u.x), u.y);",+ "}",+ "float fbm(vec2 p){",+ " float v = 0.0;",+ " float a = 0.5;",+ " for(int i=0;i<5;i++){",+ " v += a * noise2(p);",+ " p *= 2.02;",+ " a *= 0.5;",+ " }",+ " return v;",+ "}",+ "vec2 curl(vec2 p, float t){",+ " float e = 0.6;",+ " float n1 = fbm(p + vec2(0.0, e) + t*0.18);",+ " float n2 = fbm(p + vec2(0.0, -e) + t*0.18);",+ " float n3 = fbm(p + vec2( e, 0.0) + t*0.18);",+ " float n4 = fbm(p + vec2(-e, 0.0) + t*0.18);",+ " return vec2(n1 - n2, -(n3 - n4));",+ "}",+ "vec3 palette(float t){",+ " t = clamp(t, 0.0, 1.0);",+ " vec3 lowMid = mix(uColLow, uColMid, smoothstep(0.0, 0.5, t));",+ " return mix(lowMid, uColHigh, smoothstep(0.5, 1.0, t));",+ "}",+ "vec3 sampleField(vec2 uv, float t, float energy){",+ " vec2 p = (uv - 0.5) * vec2(uResolution.x/uResolution.y, 1.0) * 2.4;",+ " vec2 c = curl(p * 0.9, t);",+ " vec2 q = p + c * (0.45 + 0.55 * energy);",+ " float flow = fbm(q * 1.6 + vec2(t * 0.11, -t * 0.07));",+ " float bands = sin(flow * 14.0 + t * 1.1);",+ " bands = smoothstep(0.0, 1.0, 0.5 + 0.5 * bands);",+ " float r = length(p);",+ " float core = smoothstep(1.5, 0.05, r) * (0.6 + 0.4 * energy);",+ " float glow = exp(-r * 1.6) * (0.55 + 0.45 * energy);",+ " float k = clamp(flow * 0.85 + 0.15 * bands + 0.25 * core + 0.6 * glow, 0.0, 1.4);",+ " vec3 col = palette(k * 0.9 + 0.1 * sin(t * 0.4));",+ " col *= 0.7 + 0.6 * energy;",+ " col += uAccent * core * 0.55;",+ " return col;",+ "}",+ "void main(){",+ " vec2 uv = vUv;",+ " float t = uTime * uSpeed;",+ " float e = uIntensity;",+ " vec2 dir = normalize(uv - 0.5 + 1e-6);",+ " float ca = uChromAb * (0.004 + 0.012 * length(uv - 0.5));",+ " vec3 cR = sampleField(uv + dir * ca, t, e);",+ " vec3 cG = sampleField(uv, t, e);",+ " vec3 cB = sampleField(uv - dir * ca, t, e);",+ " vec3 col = vec3(cR.r, cG.g, cB.b);",+ " float lum = dot(col, vec3(0.299, 0.587, 0.114));",+ " col = mix(vec3(lum), col, 1.05);",+ " float rev = uReveal;",+ " float sweep = smoothstep(0.0, 0.6, rev) * (1.0 - smoothstep(0.6, 1.0, rev));",+ " col += uColHigh * sweep * 0.35;",+ " vec3 phaseTint = mix(vec3(0.85, 0.92, 1.05), vec3(1.05, 0.95, 0.85), uPhase);",+ " col *= phaseTint;",+ " float v = length(uv - 0.5);",+ " col *= 1.0 - smoothstep(0.45, 0.95, v) * uVignette;",+ " col = col / (col + 1.0);",+ " col = pow(col, vec3(1.0/2.2));",+ " gl_FragColor = vec4(col, 1.0);",+ "}",+ ].join("\n");++ function compile(type, src) {+ const s = gl.createShader(type);+ gl.shaderSource(s, src);+ gl.compileShader(s);+ return s;+ }+ const prog = gl.createProgram();+ gl.attachShader(prog, compile(gl.VERTEX_SHADER, VERT));+ gl.attachShader(prog, compile(gl.FRAGMENT_SHADER, FRAG));+ gl.linkProgram(prog);+ gl.useProgram(prog);++ // full-screen triangle+ const buf = gl.createBuffer();+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 3, -1, -1, 3]), gl.STATIC_DRAW);+ const posLoc = gl.getAttribLocation(prog, "position");+ gl.enableVertexAttribArray(posLoc);+ gl.vertexAttribPointer(posLoc, 2, gl.FLOAT, false, 0, 0);+ gl.viewport(0, 0, 1920, 1080);++ const L = (n) => gl.getUniformLocation(prog, n);+ const uLoc = {+ uTime: L("uTime"),+ uPhase: L("uPhase"),+ uReveal: L("uReveal"),+ uChromAb: L("uChromAb"),+ uVignette: L("uVignette"),+ uIntensity: L("uIntensity"),+ uSpeed: L("uSpeed"),+ uResolution: L("uResolution"),+ uColLow: L("uColLow"),+ uColMid: L("uColMid"),+ uColHigh: L("uColHigh"),+ uAccent: L("uAccent"),+ };++ // animated uniform state (GSAP tweens these .value fields)+ const u = {+ uTime: { value: 0 },+ uPhase: { value: 0.1 },+ uReveal: { value: 0 },+ uChromAb: { value: 0 },+ uVignette: { value: 0 },+ uIntensity: { value: 0.3 },+ };+ const speed = Number(vars.flowSpeed) || 1;+ const cLow = hexLin(vars.colorLow);+ const cMid = hexLin(vars.colorMid);+ const cHigh = hexLin(vars.colorHigh);+ const cAcc = hexLin(vars.accentColor);++ function render() {+ gl.uniform1f(uLoc.uTime, u.uTime.value);+ gl.uniform1f(uLoc.uPhase, u.uPhase.value);+ gl.uniform1f(uLoc.uReveal, u.uReveal.value);+ gl.uniform1f(uLoc.uChromAb, u.uChromAb.value);+ gl.uniform1f(uLoc.uVignette, u.uVignette.value);+ gl.uniform1f(uLoc.uIntensity, u.uIntensity.value);+ gl.uniform1f(uLoc.uSpeed, speed);+ gl.uniform2f(uLoc.uResolution, 1920, 1080);+ gl.uniform3fv(uLoc.uColLow, cLow);+ gl.uniform3fv(uLoc.uColMid, cMid);+ gl.uniform3fv(uLoc.uColHigh, cHigh);+ gl.uniform3fv(uLoc.uAccent, cAcc);+ gl.drawArrays(gl.TRIANGLES, 0, 3);+ }+ render(); // initial frame so a seek to 0 / first paint is correct++ // ── Energy-envelope drive (the "living field" breath): all repaint is via+ // onUpdate, so the field is fully determined by the timeline position — no+ // requestAnimationFrame, seek-safe. ──+ tl.eventCallback("onUpdate", render);++ tl.to(u.uTime, { value: 4, duration: 4, ease: "none" }, 0);++ // energy: settle-in → breathe → SURGE → settle dark for the hold+ tl.to(u.uIntensity, { value: 0.6, duration: 1.2, ease: "sine.inOut" }, 0);+ tl.to(u.uIntensity, { value: 1.0, duration: 0.7, ease: "power2.in" }, 1.3);+ tl.to(u.uIntensity, { value: 0.35, duration: 2.0, ease: "power2.out" }, 2.0);++ // chromatic light-leak: light at entry, spikes on the surge, then settles+ tl.fromTo(u.uChromAb, { value: 0 }, { value: 0.4, duration: 1.2, ease: "sine.in" }, 0);+ tl.to(u.uChromAb, { value: 1.4, duration: 0.5, ease: "power3.in" }, 1.4);+ tl.to(u.uChromAb, { value: 0.2, duration: 1.6, ease: "power2.out" }, 1.9);++ // a brief highlight sweep across the surge+ tl.fromTo(u.uReveal, { value: 0 }, { value: 1, duration: 0.7, ease: "none" }, 1.3);+ tl.set(u.uReveal, { value: 0 }, 2.0);++ // colour-temperature drift+ tl.to(u.uPhase, { value: 0.6, duration: 2.2, ease: "sine.inOut" }, 0.6);++ // black mask settles the field to near-black + central glow for the hold+ tl.to(u.uVignette, { value: 0.85, duration: 1.6, ease: "power2.out" }, 1.9);++ window.__timelines["bg-flow-field"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/binary-decrypt/index.html b/skills/music-to-video/references/motion-primitives/binary-decrypt/index.htmlindex 1a4fe364f0..0a33d03755 100644--- a/skills/music-to-video/references/motion-primitives/binary-decrypt/index.html+++ b/skills/music-to-video/references/motion-primitives/binary-decrypt/index.html@@ -14,11 +14,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -30,31 +25,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .crypt {- font-family: "JetBrains Mono", monospace;- font-weight: 700;- font-size: 200px;- letter-spacing: 0.02em;- color: var(--hg-cyan);- text-shadow: 0 0 30px rgba(42, 255, 240, 0.5);- }- .crypt .char {- display: inline-block;- min-width: 1ch;- }</style></head><body>@@ -66,55 +36,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="stage">- <div class="crypt">- <span class="char" data-target="D">_</span><span class="char" data-target="E">_</span- ><span class="char" data-target="C">_</span><span class="char" data-target="R">_</span- ><span class="char" data-target="Y">_</span><span class="char" data-target="P">_</span- ><span class="char" data-target="T">_</span>- </div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="binary-decrypt"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- const SCRAMBLE = "01█▓▒░▀▄■◆◇▪▫";- function scrambleChar(charIdx, phase) {- const tick = Math.floor(phase * 60);- const i = (charIdx * 7 + tick * 13 + 3) % SCRAMBLE.length;- return SCRAMBLE.charAt(i);- }- const cryptState = [{ p: 0 }, { p: 0 }, { p: 0 }, { p: 0 }, { p: 0 }, { p: 0 }, { p: 0 }];- cryptState.forEach((state, idx) => {- tl.to(- state,- {- p: 1,- duration: 0.85,- delay: idx * 0.05,- ease: "power2.out",- onUpdate: function () {- const spans = document.querySelectorAll(".crypt .char");- const span = spans[idx];- if (!span) return;- const target = span.getAttribute("data-target");- if (state.p >= 0.72) {- span.textContent = target;- span.style.color = "var(--hg-fg)";- span.style.textShadow = "0 0 30px rgba(168, 85, 247, 0.8)";- } else {- span.textContent = scrambleChar(idx, state.p);- }- },- },- 0.15,- );- });-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/binary-decrypt/scene.html b/skills/music-to-video/references/motion-primitives/binary-decrypt/scene.htmlnew file mode 100644index 0000000000..62fa76b896--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/binary-decrypt/scene.html@@ -0,0 +1,85 @@+<template id="binary-decrypt-template">+ <div data-composition-id="binary-decrypt" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-cyan: #2afff0;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .crypt {+ font-family: "JetBrains Mono", monospace;+ font-weight: 700;+ font-size: 200px;+ letter-spacing: 0.02em;+ color: var(--hg-cyan);+ text-shadow: 0 0 30px rgba(42, 255, 240, 0.5);+ }+ .crypt .char {+ display: inline-block;+ min-width: 1ch;+ }+ </style>+ <div class="stage">+ <div class="crypt">+ <span class="char" data-target="D">_</span><span class="char" data-target="E">_</span+ ><span class="char" data-target="C">_</span><span class="char" data-target="R">_</span+ ><span class="char" data-target="Y">_</span><span class="char" data-target="P">_</span+ ><span class="char" data-target="T">_</span>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ const SCRAMBLE = "01█▓▒░▀▄■◆◇▪▫";+ function scrambleChar(charIdx, phase) {+ const tick = Math.floor(phase * 60);+ const i = (charIdx * 7 + tick * 13 + 3) % SCRAMBLE.length;+ return SCRAMBLE.charAt(i);+ }+ const cryptState = [{ p: 0 }, { p: 0 }, { p: 0 }, { p: 0 }, { p: 0 }, { p: 0 }, { p: 0 }];+ cryptState.forEach((state, idx) => {+ tl.to(+ state,+ {+ p: 1,+ duration: 0.85,+ delay: idx * 0.05,+ ease: "power2.out",+ onUpdate: function () {+ const spans = document.querySelectorAll(".crypt .char");+ const span = spans[idx];+ if (!span) return;+ const target = span.getAttribute("data-target");+ if (state.p >= 0.72) {+ span.textContent = target;+ span.style.color = "var(--hg-fg)";+ span.style.textShadow = "0 0 30px rgba(168, 85, 247, 0.8)";+ } else {+ span.textContent = scrambleChar(idx, state.p);+ }+ },+ },+ 0.15,+ );+ });++ window.__timelines["binary-decrypt"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/blur-resolve/index.html b/skills/music-to-video/references/motion-primitives/blur-resolve/index.htmlindex aa07db7098..c6bf42e140 100644--- a/skills/music-to-video/references/motion-primitives/blur-resolve/index.html+++ b/skills/music-to-video/references/motion-primitives/blur-resolve/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,28 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .hero {- font-weight: 900;- font-size: 320px;- letter-spacing: -0.04em;- line-height: 0.95;- color: var(--hg-fg);- white-space: nowrap;- will-change: filter, transform, opacity;- }</style></head><body>@@ -62,34 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="stage">- <div class="hero" id="hero">FOCUS</div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="blur-resolve"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- // Resolve: heavy blur + scaled-up + dim settles into perfect crisp focus.- tl.fromTo(- "#hero",- { filter: "blur(36px)", scale: 1.08, opacity: 0.25 },- { filter: "blur(0px)", scale: 1, opacity: 1, duration: 0.7, ease: "power2.out" },- 0.05,- );-- // Hold crisp through the middle (no keys needed — state persists to ~1.5).-- // Blur-out near the end: brief defocus + dim, a cut-away that loops seamlessly.- tl.to(- "#hero",- { filter: "blur(24px)", opacity: 0.25, duration: 0.25, ease: "power2.in" },- 1.7,- );-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/blur-resolve/scene.html b/skills/music-to-video/references/motion-primitives/blur-resolve/scene.htmlnew file mode 100644index 0000000000..a6b3a59f66--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/blur-resolve/scene.html@@ -0,0 +1,60 @@+<template id="blur-resolve-template">+ <div data-composition-id="blur-resolve" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .hero {+ font-weight: 900;+ font-size: 320px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ color: var(--hg-fg);+ white-space: nowrap;+ will-change: filter, transform, opacity;+ }+ </style>+ <div class="stage">+ <div class="hero" id="hero">FOCUS</div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Resolve: heavy blur + scaled-up + dim settles into perfect crisp focus.+ tl.fromTo(+ "#hero",+ { filter: "blur(36px)", scale: 1.08, opacity: 0.25 },+ { filter: "blur(0px)", scale: 1, opacity: 1, duration: 0.7, ease: "power2.out" },+ 0.05,+ );++ // Hold crisp through the middle (no keys needed — state persists to ~1.5).++ // Blur-out near the end: brief defocus + dim, a cut-away that loops seamlessly.+ tl.to(+ "#hero",+ { filter: "blur(24px)", opacity: 0.25, duration: 0.25, ease: "power2.in" },+ 1.7,+ );++ window.__timelines["blur-resolve"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/braam-punch/index.html b/skills/music-to-video/references/motion-primitives/braam-punch/index.htmlindex c4d9676c12..5d3eea01e9 100644--- a/skills/music-to-video/references/motion-primitives/braam-punch/index.html+++ b/skills/music-to-video/references/motion-primitives/braam-punch/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,46 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .hero {- font-weight: 900;- font-size: 280px;- letter-spacing: -0.04em;- line-height: 0.95;- color: var(--hg-fg);- white-space: nowrap;- will-change: transform, text-shadow;- }- .glow-ring {- position: absolute;- width: 900px;- height: 900px;- border-radius: 50%;- background: radial-gradient(circle, rgba(124, 58, 237, 0.55) 0%, rgba(124, 58, 237, 0) 65%);- filter: blur(20px);- will-change: transform, opacity;- opacity: 0;- }- .flash {- position: absolute;- inset: 0;- background: #fff;- opacity: 0;- pointer-events: none;- will-change: opacity;- }</style></head><body>@@ -80,56 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="stage">- <div class="glow-ring"></div>- <div class="hero" id="hero">BRAAM</div>- </div>- <div class="flash"></div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="braam-punch"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- tl.set("#hero", { scale: 0.92, opacity: 0 }, 0);- tl.set(".glow-ring", { scale: 0.6, opacity: 0 }, 0);- tl.to("#hero", { opacity: 1, duration: 0.18, ease: "power2.out" }, 0.05);- tl.to(".glow-ring", { scale: 1.2, opacity: 1, duration: 0.45, ease: "power3.out" }, 0.05);- tl.to(- "#hero",- {- scale: 1.18,- textShadow: "0 0 60px rgba(168,85,247,0.9)",- duration: 0.12,- ease: "power4.out",- },- 0.25,- );- tl.to(- "#hero",- {- scale: 1.0,- textShadow: "0 0 0px rgba(168,85,247,0)",- duration: 0.7,- ease: "elastic.out(1, 0.5)",- },- 0.37,- );- tl.fromTo(- ".flash",- { opacity: 0 },- { opacity: 0.85, duration: 0.06, ease: "power4.out" },- 0.25,- );- tl.to(".flash", { opacity: 0, duration: 0.35, ease: "power3.in" }, 0.31);- tl.to(- ".glow-ring",- { scale: 1.45, opacity: 0.4, duration: 1.0, ease: "power2.out", overwrite: "auto" },- 0.55,- );-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/braam-punch/scene.html b/skills/music-to-video/references/motion-primitives/braam-punch/scene.htmlnew file mode 100644index 0000000000..13628ca2e0--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/braam-punch/scene.html@@ -0,0 +1,100 @@+<template id="braam-punch-template">+ <div data-composition-id="braam-punch" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .hero {+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ color: var(--hg-fg);+ white-space: nowrap;+ will-change: transform, text-shadow;+ }+ .glow-ring {+ position: absolute;+ width: 900px;+ height: 900px;+ border-radius: 50%;+ background: radial-gradient(circle, rgba(124, 58, 237, 0.55) 0%, rgba(124, 58, 237, 0) 65%);+ filter: blur(20px);+ will-change: transform, opacity;+ opacity: 0;+ }+ .flash {+ position: absolute;+ inset: 0;+ background: #fff;+ opacity: 0;+ pointer-events: none;+ will-change: opacity;+ }+ </style>+ <div class="stage">+ <div class="glow-ring"></div>+ <div class="hero" id="hero">BRAAM</div>+ </div>+ <div class="flash"></div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.set("#hero", { scale: 0.92, opacity: 0 }, 0);+ tl.set(".glow-ring", { scale: 0.6, opacity: 0 }, 0);+ tl.to("#hero", { opacity: 1, duration: 0.18, ease: "power2.out" }, 0.05);+ tl.to(".glow-ring", { scale: 1.2, opacity: 1, duration: 0.45, ease: "power3.out" }, 0.05);+ tl.to(+ "#hero",+ {+ scale: 1.18,+ textShadow: "0 0 60px rgba(168,85,247,0.9)",+ duration: 0.12,+ ease: "power4.out",+ },+ 0.25,+ );+ tl.to(+ "#hero",+ {+ scale: 1.0,+ textShadow: "0 0 0px rgba(168,85,247,0)",+ duration: 0.7,+ ease: "elastic.out(1, 0.5)",+ },+ 0.37,+ );+ tl.fromTo(+ ".flash",+ { opacity: 0 },+ { opacity: 0.85, duration: 0.06, ease: "power4.out" },+ 0.25,+ );+ tl.to(".flash", { opacity: 0, duration: 0.35, ease: "power3.in" }, 0.31);+ tl.to(+ ".glow-ring",+ { scale: 1.45, opacity: 0.4, duration: 1.0, ease: "power2.out", overwrite: "auto" },+ 0.55,+ );++ window.__timelines["braam-punch"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/chromatic-split/index.html b/skills/music-to-video/references/motion-primitives/chromatic-split/index.htmlindex 0357054383..70ccf63ba1 100644--- a/skills/music-to-video/references/motion-primitives/chromatic-split/index.html+++ b/skills/music-to-video/references/motion-primitives/chromatic-split/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,60 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .stack {- position: relative;- font-weight: 900;- font-size: 280px;- letter-spacing: -0.04em;- line-height: 0.95;- white-space: nowrap;- }- .layer {- position: absolute;- top: 0;- left: 0;- mix-blend-mode: screen;- will-change: transform;- }- .layer.r {- color: #ff2a4a;- }- .layer.g {- color: #2afff0;- }- .layer.b {- color: #b56dff;- }- .spacer {- color: transparent;- }- .scanlines {- position: absolute;- inset: 0;- background: repeating-linear-gradient(- 0deg,- rgba(255, 255, 255, 0) 0px,- rgba(255, 255, 255, 0) 3px,- rgba(255, 255, 255, 0.04) 3px,- rgba(255, 255, 255, 0.04) 4px- );- opacity: 0;- pointer-events: none;- will-change: opacity;- }</style></head><body>@@ -94,53 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="stage">- <div class="stack">- <span class="spacer">GLITCH</span>- <span class="layer r">GLITCH</span>- <span class="layer g">GLITCH</span>- <span class="layer b">GLITCH</span>- </div>- </div>- <div class="scanlines"></div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="chromatic-split"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- tl.fromTo(- ".stack",- { opacity: 0, scale: 0.95 },- { opacity: 1, scale: 1, duration: 0.25, ease: "power2.out" },- 0.05,- );- tl.set(".layer.r", { x: -2 }, 0);- tl.set(".layer.g", { x: 2 }, 0);- tl.set(".layer.b", { x: 0 }, 0);- tl.to(".layer.r", { x: -14, duration: 0.06, ease: "steps(1)" }, 0.35);- tl.to(".layer.g", { x: 14, duration: 0.06, ease: "steps(1)" }, 0.35);- tl.to(".layer.r", { x: -4, duration: 0.06, ease: "steps(1)" }, 0.5);- tl.to(".layer.g", { x: 4, duration: 0.06, ease: "steps(1)" }, 0.5);- tl.to(".layer.r", { x: -22, duration: 0.04, ease: "steps(1)" }, 0.85);- tl.to(".layer.g", { x: 22, duration: 0.04, ease: "steps(1)" }, 0.85);- tl.to(".layer.b", { x: 6, duration: 0.04, ease: "steps(1)" }, 0.85);- tl.to(".layer.r", { x: -6, duration: 0.04, ease: "steps(1)" }, 0.97);- tl.to(".layer.g", { x: 6, duration: 0.04, ease: "steps(1)" }, 0.97);- tl.to(".layer.b", { x: -2, duration: 0.04, ease: "steps(1)" }, 0.97);- tl.to(".layer.r", { x: -3, duration: 0.4, ease: "power2.out" }, 1.2);- tl.to(".layer.g", { x: 3, duration: 0.4, ease: "power2.out" }, 1.2);- tl.to(".layer.b", { x: 0, duration: 0.4, ease: "power2.out" }, 1.2);- tl.fromTo(- ".scanlines",- { opacity: 0 },- { opacity: 0.85, duration: 0.06, ease: "steps(1)" },- 0.35,- );- tl.to(".scanlines", { opacity: 0.25, duration: 0.5, ease: "power2.out" }, 1.0);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/chromatic-split/scene.html b/skills/music-to-video/references/motion-primitives/chromatic-split/scene.htmlnew file mode 100644index 0000000000..94075ac0cc--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/chromatic-split/scene.html@@ -0,0 +1,111 @@+<template id="chromatic-split-template">+ <div data-composition-id="chromatic-split" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .stack {+ position: relative;+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ white-space: nowrap;+ }+ .layer {+ position: absolute;+ top: 0;+ left: 0;+ mix-blend-mode: screen;+ will-change: transform;+ }+ .layer.r {+ color: #ff2a4a;+ }+ .layer.g {+ color: #2afff0;+ }+ .layer.b {+ color: #b56dff;+ }+ .spacer {+ color: transparent;+ }+ .scanlines {+ position: absolute;+ inset: 0;+ background: repeating-linear-gradient(+ 0deg,+ rgba(255, 255, 255, 0) 0px,+ rgba(255, 255, 255, 0) 3px,+ rgba(255, 255, 255, 0.04) 3px,+ rgba(255, 255, 255, 0.04) 4px+ );+ opacity: 0;+ pointer-events: none;+ will-change: opacity;+ }+ </style>+ <div class="stage">+ <div class="stack">+ <span class="spacer">GLITCH</span>+ <span class="layer r">GLITCH</span>+ <span class="layer g">GLITCH</span>+ <span class="layer b">GLITCH</span>+ </div>+ </div>+ <div class="scanlines"></div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.fromTo(+ ".stack",+ { opacity: 0, scale: 0.95 },+ { opacity: 1, scale: 1, duration: 0.25, ease: "power2.out" },+ 0.05,+ );+ tl.set(".layer.r", { x: -2 }, 0);+ tl.set(".layer.g", { x: 2 }, 0);+ tl.set(".layer.b", { x: 0 }, 0);+ tl.to(".layer.r", { x: -14, duration: 0.06, ease: "steps(1)" }, 0.35);+ tl.to(".layer.g", { x: 14, duration: 0.06, ease: "steps(1)" }, 0.35);+ tl.to(".layer.r", { x: -4, duration: 0.06, ease: "steps(1)" }, 0.5);+ tl.to(".layer.g", { x: 4, duration: 0.06, ease: "steps(1)" }, 0.5);+ tl.to(".layer.r", { x: -22, duration: 0.04, ease: "steps(1)" }, 0.85);+ tl.to(".layer.g", { x: 22, duration: 0.04, ease: "steps(1)" }, 0.85);+ tl.to(".layer.b", { x: 6, duration: 0.04, ease: "steps(1)" }, 0.85);+ tl.to(".layer.r", { x: -6, duration: 0.04, ease: "steps(1)" }, 0.97);+ tl.to(".layer.g", { x: 6, duration: 0.04, ease: "steps(1)" }, 0.97);+ tl.to(".layer.b", { x: -2, duration: 0.04, ease: "steps(1)" }, 0.97);+ tl.to(".layer.r", { x: -3, duration: 0.4, ease: "power2.out" }, 1.2);+ tl.to(".layer.g", { x: 3, duration: 0.4, ease: "power2.out" }, 1.2);+ tl.to(".layer.b", { x: 0, duration: 0.4, ease: "power2.out" }, 1.2);+ tl.fromTo(+ ".scanlines",+ { opacity: 0 },+ { opacity: 0.85, duration: 0.06, ease: "steps(1)" },+ 0.35,+ );+ tl.to(".scanlines", { opacity: 0.25, duration: 0.5, ease: "power2.out" }, 1.0);++ window.__timelines["chromatic-split"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/chrome-sweep/index.html b/skills/music-to-video/references/motion-primitives/chrome-sweep/index.htmlindex 7f7334bf13..ec68bc93b7 100644--- a/skills/music-to-video/references/motion-primitives/chrome-sweep/index.html+++ b/skills/music-to-video/references/motion-primitives/chrome-sweep/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,42 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .chrome {- font-weight: 900;- font-size: 280px;- letter-spacing: -0.04em;- background: linear-gradient(- 110deg,- #404048 0%,- #b4b4be 20%,- #ffffff 45%,- #ffffff 50%,- #d8d8e0 60%,- #5a5a64 85%,- #ffffff 100%- );- background-size: 250% 100%;- background-position: 200% 0;- -webkit-background-clip: text;- background-clip: text;- -webkit-text-fill-color: transparent;- color: transparent;- will-change: background-position;- filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.4));- }</style></head><body>@@ -76,28 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="stage"><div class="chrome">CHROME</div></div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="chrome-sweep"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- tl.fromTo(- ".chrome",- { opacity: 0, scale: 0.96 },- { opacity: 1, scale: 1, duration: 0.3, ease: "power3.out" },- 0.2,- );- tl.fromTo(- ".chrome",- { backgroundPosition: "200% 0" },- { backgroundPosition: "-100% 0", duration: 1.4, ease: "power2.inOut" },- 0.3,- );-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/chrome-sweep/scene.html b/skills/music-to-video/references/motion-primitives/chrome-sweep/scene.htmlnew file mode 100644index 0000000000..33a6a68f6e--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/chrome-sweep/scene.html@@ -0,0 +1,68 @@+<template id="chrome-sweep-template">+ <div data-composition-id="chrome-sweep" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .chrome {+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ background: linear-gradient(+ 110deg,+ #404048 0%,+ #b4b4be 20%,+ #ffffff 45%,+ #ffffff 50%,+ #d8d8e0 60%,+ #5a5a64 85%,+ #ffffff 100%+ );+ background-size: 250% 100%;+ background-position: 200% 0;+ -webkit-background-clip: text;+ background-clip: text;+ -webkit-text-fill-color: transparent;+ color: transparent;+ will-change: background-position;+ filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.4));+ }+ </style>+ <div class="stage"><div class="chrome">CHROME</div></div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.fromTo(+ ".chrome",+ { opacity: 0, scale: 0.96 },+ { opacity: 1, scale: 1, duration: 0.3, ease: "power3.out" },+ 0.2,+ );+ tl.fromTo(+ ".chrome",+ { backgroundPosition: "200% 0" },+ { backgroundPosition: "-100% 0", duration: 1.4, ease: "power2.inOut" },+ 0.3,+ );++ window.__timelines["chrome-sweep"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/counting-punch/index.html b/skills/music-to-video/references/motion-primitives/counting-punch/index.htmlindex 6f693c3e9b..f3ceeda278 100644--- a/skills/music-to-video/references/motion-primitives/counting-punch/index.html+++ b/skills/music-to-video/references/motion-primitives/counting-punch/index.html@@ -14,11 +14,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -30,44 +25,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- flex-direction: column;- align-items: center;- justify-content: center;- gap: 30px;- }- .counter {- font-weight: 900;- font-size: 360px;- letter-spacing: -0.04em;- font-variant-numeric: tabular-nums;- color: var(--hg-fg);- will-change: transform, text-shadow;- line-height: 1;- }- .caption {- font-family: "JetBrains Mono", monospace;- font-size: 28px;- color: var(--hg-dim);- letter-spacing: 0.3em;- text-transform: uppercase;- opacity: 0;- }- .underline {- height: 4px;- background: var(--hg-violet-2);- width: 0;- box-shadow: 0 0 20px var(--hg-violet);- }</style></head><body>@@ -79,76 +36,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="stage">- <div class="counter" id="counter">0</div>- <div class="underline" id="underline"></div>- <div class="caption" id="caption">USERS THIS WEEK</div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="counting-punch"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- const TARGET = 12847;- const counter = { v: 0 };- let lastShown = 0;-- function format(n) {- return Math.floor(n).toLocaleString("en-US");- }-- tl.to(- counter,- {- v: TARGET,- duration: 1.15,- ease: "expo.out",- onUpdate: function () {- const el = document.getElementById("counter");- if (!el) return;- const cur = Math.floor(counter.v);- if (cur !== lastShown) {- el.textContent = format(cur);- // tiny scale tick on each digit change- el.style.transform = "scale(1.045)";- el.style.textShadow = "0 0 40px rgba(168, 85, 247, 0.6)";- // browser will paint, then this resets via the next onUpdate- }- lastShown = cur;- },- },- 0.15,- );-- // Big settle punch at landing- tl.to(- "#counter",- {- scale: 1.12,- textShadow: "0 0 80px rgba(168, 85, 247, 0.9)",- duration: 0.1,- ease: "power4.out",- },- 1.3,- );- tl.to(- "#counter",- {- scale: 1.0,- textShadow: "0 0 20px rgba(168, 85, 247, 0.4)",- duration: 0.6,- ease: "elastic.out(1, 0.55)",- },- 1.4,- );-- // Underline draws- tl.to("#underline", { width: 420, duration: 0.6, ease: "expo.out" }, 1.35);- tl.to("#caption", { opacity: 1, duration: 0.5, ease: "power2.out" }, 1.55);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/counting-punch/scene.html b/skills/music-to-video/references/motion-primitives/counting-punch/scene.htmlnew file mode 100644index 0000000000..61ca679418--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/counting-punch/scene.html@@ -0,0 +1,119 @@+<template id="counting-punch-template">+ <div data-composition-id="counting-punch" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-cyan: #2afff0;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ gap: 30px;+ }+ .counter {+ font-weight: 900;+ font-size: 360px;+ letter-spacing: -0.04em;+ font-variant-numeric: tabular-nums;+ color: var(--hg-fg);+ will-change: transform, text-shadow;+ line-height: 1;+ }+ .caption {+ font-family: "JetBrains Mono", monospace;+ font-size: 28px;+ color: var(--hg-dim);+ letter-spacing: 0.3em;+ text-transform: uppercase;+ opacity: 0;+ }+ .underline {+ height: 4px;+ background: var(--hg-violet-2);+ width: 0;+ box-shadow: 0 0 20px var(--hg-violet);+ }+ </style>+ <div class="stage">+ <div class="counter" id="counter">0</div>+ <div class="underline" id="underline"></div>+ <div class="caption" id="caption">USERS THIS WEEK</div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ const TARGET = 12847;+ const counter = { v: 0 };+ let lastShown = 0;++ function format(n) {+ return Math.floor(n).toLocaleString("en-US");+ }++ tl.to(+ counter,+ {+ v: TARGET,+ duration: 1.15,+ ease: "expo.out",+ onUpdate: function () {+ const el = document.getElementById("counter");+ if (!el) return;+ const cur = Math.floor(counter.v);+ if (cur !== lastShown) {+ el.textContent = format(cur);+ // tiny scale tick on each digit change+ el.style.transform = "scale(1.045)";+ el.style.textShadow = "0 0 40px rgba(168, 85, 247, 0.6)";+ // browser will paint, then this resets via the next onUpdate+ }+ lastShown = cur;+ },+ },+ 0.15,+ );++ // Big settle punch at landing+ tl.to(+ "#counter",+ {+ scale: 1.12,+ textShadow: "0 0 80px rgba(168, 85, 247, 0.9)",+ duration: 0.1,+ ease: "power4.out",+ },+ 1.3,+ );+ tl.to(+ "#counter",+ {+ scale: 1.0,+ textShadow: "0 0 20px rgba(168, 85, 247, 0.4)",+ duration: 0.6,+ ease: "elastic.out(1, 0.55)",+ },+ 1.4,+ );++ // Underline draws+ tl.to("#underline", { width: 420, duration: 0.6, ease: "expo.out" }, 1.35);+ tl.to("#caption", { opacity: 1, duration: 0.5, ease: "power2.out" }, 1.55);++ window.__timelines["counting-punch"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/crash-zoom-in/index.html b/skills/music-to-video/references/motion-primitives/crash-zoom-in/index.htmlindex ddbfc06e67..572e7c7a9c 100644--- a/skills/music-to-video/references/motion-primitives/crash-zoom-in/index.html+++ b/skills/music-to-video/references/motion-primitives/crash-zoom-in/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,54 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .zoom-stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- will-change: transform;- }- .radial-bg {- position: absolute;- inset: 0;- background: radial-gradient(- circle at center,- rgba(168, 85, 247, 0.18) 0%,- transparent 35%,- rgba(0, 0, 0, 0.6) 80%- );- opacity: 0;- will-change: opacity, transform;- }- .speed-lines {- position: absolute;- inset: 0;- background: repeating-radial-gradient(- circle at 50% 50%,- transparent 0px,- transparent 6px,- rgba(255, 255, 255, 0.08) 7px,- transparent 8px- );- opacity: 0;- will-change: opacity;- mix-blend-mode: screen;- }- .hero {- font-weight: 900;- font-size: 360px;- letter-spacing: -0.05em;- color: var(--hg-fg);- white-space: nowrap;- will-change: transform, filter;- }</style></head><body>@@ -88,68 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="radial-bg"></div>- <div class="speed-lines"></div>- <div class="zoom-stage"><div class="hero">CRASH</div></div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="crash-zoom-in"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- // Hold black for tension- tl.set(".hero", { scale: 0.03, filter: "blur(20px)", opacity: 0 }, 0);-- const CRASH = 0.45;-- // The crash itself- tl.to(- ".hero",- { scale: 1.0, filter: "blur(0px)", opacity: 1, duration: 0.32, ease: "expo.in" },- CRASH,- );-- // Background swoosh in same window- tl.fromTo(- ".radial-bg",- { opacity: 0, scale: 0.4 },- { opacity: 1, scale: 1, duration: 0.32, ease: "expo.in" },- CRASH,- );- tl.fromTo(- ".speed-lines",- { opacity: 0, scale: 0.2 },- { opacity: 1, scale: 1.4, duration: 0.32, ease: "expo.in" },- CRASH,- );-- // Landing settle- const LAND = CRASH + 0.32;- tl.to(".hero", { scale: 0.96, duration: 0.08, ease: "power3.out" }, LAND);- tl.to(".hero", { scale: 1.0, duration: 0.5, ease: "elastic.out(1, 0.55)" }, LAND + 0.08);-- // Quick landing shake- const sh = [9, -7, 5, -4, 2, -1];- sh.forEach((amp, i) => {- tl.to(- ".zoom-stage",- { x: amp, y: amp * 0.5 * (i % 2 ? -1 : 1), duration: 0.03, ease: "steps(1)" },- LAND + i * 0.03,- );- });- tl.to(- ".zoom-stage",- { x: 0, y: 0, duration: 0.1, ease: "power2.out" },- LAND + sh.length * 0.03,- );-- // Speed lines fade- tl.to(".speed-lines", { opacity: 0, duration: 0.4, ease: "power2.out" }, LAND + 0.05);- // Radial settles- tl.to(".radial-bg", { opacity: 0.5, duration: 0.5, ease: "power2.out" }, LAND);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/crash-zoom-in/scene.html b/skills/music-to-video/references/motion-primitives/crash-zoom-in/scene.htmlnew file mode 100644index 0000000000..e24a20da3c--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/crash-zoom-in/scene.html@@ -0,0 +1,120 @@+<template id="crash-zoom-in-template">+ <div data-composition-id="crash-zoom-in" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .zoom-stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ will-change: transform;+ }+ .radial-bg {+ position: absolute;+ inset: 0;+ background: radial-gradient(+ circle at center,+ rgba(168, 85, 247, 0.18) 0%,+ transparent 35%,+ rgba(0, 0, 0, 0.6) 80%+ );+ opacity: 0;+ will-change: opacity, transform;+ }+ .speed-lines {+ position: absolute;+ inset: 0;+ background: repeating-radial-gradient(+ circle at 50% 50%,+ transparent 0px,+ transparent 6px,+ rgba(255, 255, 255, 0.08) 7px,+ transparent 8px+ );+ opacity: 0;+ will-change: opacity;+ mix-blend-mode: screen;+ }+ .hero {+ font-weight: 900;+ font-size: 360px;+ letter-spacing: -0.05em;+ color: var(--hg-fg);+ white-space: nowrap;+ will-change: transform, filter;+ }+ </style>+ <div class="radial-bg"></div>+ <div class="speed-lines"></div>+ <div class="zoom-stage"><div class="hero">CRASH</div></div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Hold black for tension+ tl.set(".hero", { scale: 0.03, filter: "blur(20px)", opacity: 0 }, 0);++ const CRASH = 0.45;++ // The crash itself+ tl.to(+ ".hero",+ { scale: 1.0, filter: "blur(0px)", opacity: 1, duration: 0.32, ease: "expo.in" },+ CRASH,+ );++ // Background swoosh in same window+ tl.fromTo(+ ".radial-bg",+ { opacity: 0, scale: 0.4 },+ { opacity: 1, scale: 1, duration: 0.32, ease: "expo.in" },+ CRASH,+ );+ tl.fromTo(+ ".speed-lines",+ { opacity: 0, scale: 0.2 },+ { opacity: 1, scale: 1.4, duration: 0.32, ease: "expo.in" },+ CRASH,+ );++ // Landing settle+ const LAND = CRASH + 0.32;+ tl.to(".hero", { scale: 0.96, duration: 0.08, ease: "power3.out" }, LAND);+ tl.to(".hero", { scale: 1.0, duration: 0.5, ease: "elastic.out(1, 0.55)" }, LAND + 0.08);++ // Quick landing shake+ const sh = [9, -7, 5, -4, 2, -1];+ sh.forEach((amp, i) => {+ tl.to(+ ".zoom-stage",+ { x: amp, y: amp * 0.5 * (i % 2 ? -1 : 1), duration: 0.03, ease: "steps(1)" },+ LAND + i * 0.03,+ );+ });+ tl.to(+ ".zoom-stage",+ { x: 0, y: 0, duration: 0.1, ease: "power2.out" },+ LAND + sh.length * 0.03,+ );++ // Speed lines fade+ tl.to(".speed-lines", { opacity: 0, duration: 0.4, ease: "power2.out" }, LAND + 0.05);+ // Radial settles+ tl.to(".radial-bg", { opacity: 0.5, duration: 0.5, ease: "power2.out" }, LAND);++ window.__timelines["crash-zoom-in"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/datamosh-smear/index.html b/skills/music-to-video/references/motion-primitives/datamosh-smear/index.htmlindex 37126f3cb4..38849dc849 100644--- a/skills/music-to-video/references/motion-primitives/datamosh-smear/index.html+++ b/skills/music-to-video/references/motion-primitives/datamosh-smear/index.html@@ -15,11 +15,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -31,73 +26,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .smear-stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .smear-hero {- position: relative;- font-weight: 900;- font-size: 320px;- letter-spacing: -0.05em;- line-height: 0.95;- white-space: nowrap;- }- .smear-layer {- position: absolute;- top: 0;- left: 0;- mix-blend-mode: screen;- will-change: transform, opacity, filter;- }- .smear-layer.l1 {- color: #ff2a4a;- }- .smear-layer.l2 {- color: #2afff0;- }- .smear-layer.l3 {- color: #b56dff;- }- .smear-layer.l4 {- color: #ffd166;- }- .smear-layer.l5 {- color: #f5f5fa;- }- .spacer {- color: transparent;- }- .scan-noise {- position: absolute;- inset: 0;- background:- repeating-linear-gradient(- 0deg,- rgba(255, 255, 255, 0) 0px,- rgba(255, 255, 255, 0) 2px,- rgba(255, 255, 255, 0.07) 3px- ),- repeating-linear-gradient(- 90deg,- rgba(0, 0, 0, 0) 0px,- rgba(0, 0, 0, 0) 4px,- rgba(0, 0, 0, 0.15) 5px- );- opacity: 0;- will-change: opacity;- pointer-events: none;- mix-blend-mode: overlay;- }</style></head><body>@@ -109,58 +37,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="smear-stage">- <div class="smear-hero">- <span class="spacer">SMEAR</span>- <span class="smear-layer l1">SMEAR</span>- <span class="smear-layer l2">SMEAR</span>- <span class="smear-layer l3">SMEAR</span>- <span class="smear-layer l4">SMEAR</span>- <span class="smear-layer l5">SMEAR</span>- </div>- </div>- <div class="scan-noise"></div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="datamosh-smear"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- // All layers start far right, stagger-lag in, then settle near center- const layers = [- ".smear-layer.l1",- ".smear-layer.l2",- ".smear-layer.l3",- ".smear-layer.l4",- ".smear-layer.l5",- ];-- layers.forEach((sel, i) => {- tl.fromTo(- sel,- { x: 360, opacity: 0, filter: "blur(20px)" },- { x: 0, opacity: 0.85, filter: "blur(0px)", duration: 0.7, ease: "expo.out" },- 0.2 + i * 0.08,- );- });-- // Final settle: pull layers into proper offset- const finalX = [-6, -2, 0, 2, 4];- layers.forEach((sel, i) => {- tl.to(sel, { x: finalX[i], duration: 0.4, ease: "power2.out" }, 1.1);- });-- // Scan noise pulses- tl.fromTo(- ".scan-noise",- { opacity: 0 },- { opacity: 1, duration: 0.06, ease: "steps(1)" },- 0.2,- );- tl.to(".scan-noise", { opacity: 0.25, duration: 0.8, ease: "power2.out" }, 0.6);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/datamosh-smear/scene.html b/skills/music-to-video/references/motion-primitives/datamosh-smear/scene.htmlnew file mode 100644index 0000000000..2fbe61070f--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/datamosh-smear/scene.html@@ -0,0 +1,131 @@+<template id="datamosh-smear-template">+ <div data-composition-id="datamosh-smear" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-cyan: #2afff0;+ --hg-magenta: #ff2a4a;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .smear-stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .smear-hero {+ position: relative;+ font-weight: 900;+ font-size: 320px;+ letter-spacing: -0.05em;+ line-height: 0.95;+ white-space: nowrap;+ }+ .smear-layer {+ position: absolute;+ top: 0;+ left: 0;+ mix-blend-mode: screen;+ will-change: transform, opacity, filter;+ }+ .smear-layer.l1 {+ color: #ff2a4a;+ }+ .smear-layer.l2 {+ color: #2afff0;+ }+ .smear-layer.l3 {+ color: #b56dff;+ }+ .smear-layer.l4 {+ color: #ffd166;+ }+ .smear-layer.l5 {+ color: #f5f5fa;+ }+ .spacer {+ color: transparent;+ }+ .scan-noise {+ position: absolute;+ inset: 0;+ background:+ repeating-linear-gradient(+ 0deg,+ rgba(255, 255, 255, 0) 0px,+ rgba(255, 255, 255, 0) 2px,+ rgba(255, 255, 255, 0.07) 3px+ ),+ repeating-linear-gradient(+ 90deg,+ rgba(0, 0, 0, 0) 0px,+ rgba(0, 0, 0, 0) 4px,+ rgba(0, 0, 0, 0.15) 5px+ );+ opacity: 0;+ will-change: opacity;+ pointer-events: none;+ mix-blend-mode: overlay;+ }+ </style>+ <div class="smear-stage">+ <div class="smear-hero">+ <span class="spacer">SMEAR</span>+ <span class="smear-layer l1">SMEAR</span>+ <span class="smear-layer l2">SMEAR</span>+ <span class="smear-layer l3">SMEAR</span>+ <span class="smear-layer l4">SMEAR</span>+ <span class="smear-layer l5">SMEAR</span>+ </div>+ </div>+ <div class="scan-noise"></div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // All layers start far right, stagger-lag in, then settle near center+ const layers = [+ ".smear-layer.l1",+ ".smear-layer.l2",+ ".smear-layer.l3",+ ".smear-layer.l4",+ ".smear-layer.l5",+ ];++ layers.forEach((sel, i) => {+ tl.fromTo(+ sel,+ { x: 360, opacity: 0, filter: "blur(20px)" },+ { x: 0, opacity: 0.85, filter: "blur(0px)", duration: 0.7, ease: "expo.out" },+ 0.2 + i * 0.08,+ );+ });++ // Final settle: pull layers into proper offset+ const finalX = [-6, -2, 0, 2, 4];+ layers.forEach((sel, i) => {+ tl.to(sel, { x: finalX[i], duration: 0.4, ease: "power2.out" }, 1.1);+ });++ // Scan noise pulses+ tl.fromTo(+ ".scan-noise",+ { opacity: 0 },+ { opacity: 1, duration: 0.06, ease: "steps(1)" },+ 0.2,+ );+ tl.to(".scan-noise", { opacity: 0.25, duration: 0.8, ease: "power2.out" }, 0.6);++ window.__timelines["datamosh-smear"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/directional-fill/index.html b/skills/music-to-video/references/motion-primitives/directional-fill/index.htmlindex 00d45b61fa..8e76ea9553 100644--- a/skills/music-to-video/references/motion-primitives/directional-fill/index.html+++ b/skills/music-to-video/references/motion-primitives/directional-fill/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,60 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- flex-direction: column;- align-items: center;- justify-content: center;- gap: 36px;- }- .bar {- position: relative;- width: 1040px;- height: 188px;- border: 3px solid var(--hg-dim);- border-radius: 12px;- overflow: hidden;- display: flex;- align-items: center;- padding: 0 56px;- }- .fill {- position: absolute;- inset: 0;- transform: scaleX(0);- will-change: transform;- }- .fill.a {- background: var(--hg-violet);- transform-origin: left center;- }- .fill.b {- background: var(--hg-violet-2);- transform-origin: right center;- }- .fill.c {- background: #2afff0;- transform-origin: left center;- }- .label {- position: relative;- z-index: 1;- font-weight: 900;- font-size: 96px;- letter-spacing: -0.03em;- line-height: 1;- color: var(--hg-fg);- will-change: color;- }</style></head><body>@@ -94,40 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="1.8" data-track-index="1">- <div class="stage">- <div class="bar">- <div class="fill a"></div>- <span class="label" id="l1">READY</span>- </div>- <div class="bar">- <div class="fill b"></div>- <span class="label" id="l2">SET</span>- </div>- <div class="bar">- <div class="fill c"></div>- <span class="label" id="l3">FILL</span>- </div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="directional-fill"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="1.8"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- // Bar 1 — sweeps left -> right, landing on the beat at ~0.55s.- tl.to(".fill.a", { scaleX: 1, duration: 0.35, ease: "power2.out" }, 0.2);- tl.set("#l1", { color: "var(--hg-bg)" }, 0.55);-- // Bar 2 — sweeps right -> left, landing at ~0.85s.- tl.to(".fill.b", { scaleX: 1, duration: 0.35, ease: "power2.out" }, 0.5);- tl.set("#l2", { color: "var(--hg-bg)" }, 0.85);-- // Bar 3 — sweeps left -> right, landing at ~1.15s.- tl.to(".fill.c", { scaleX: 1, duration: 0.35, ease: "power2.out" }, 0.8);- tl.set("#l3", { color: "var(--hg-bg)" }, 1.15);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/directional-fill/scene.html b/skills/music-to-video/references/motion-primitives/directional-fill/scene.htmlnew file mode 100644index 0000000000..75d1d2314a--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/directional-fill/scene.html@@ -0,0 +1,103 @@+<template id="directional-fill-template">+ <div+ data-composition-id="directional-fill"+ data-width="1920"+ data-height="1080"+ data-duration="1.8"+ >+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ gap: 36px;+ }+ .bar {+ position: relative;+ width: 1040px;+ height: 188px;+ border: 3px solid var(--hg-dim);+ border-radius: 12px;+ overflow: hidden;+ display: flex;+ align-items: center;+ padding: 0 56px;+ }+ .fill {+ position: absolute;+ inset: 0;+ transform: scaleX(0);+ will-change: transform;+ }+ .fill.a {+ background: var(--hg-violet);+ transform-origin: left center;+ }+ .fill.b {+ background: var(--hg-violet-2);+ transform-origin: right center;+ }+ .fill.c {+ background: #2afff0;+ transform-origin: left center;+ }+ .label {+ position: relative;+ z-index: 1;+ font-weight: 900;+ font-size: 96px;+ letter-spacing: -0.03em;+ line-height: 1;+ color: var(--hg-fg);+ will-change: color;+ }+ </style>+ <div class="stage">+ <div class="bar">+ <div class="fill a"></div>+ <span class="label" id="l1">READY</span>+ </div>+ <div class="bar">+ <div class="fill b"></div>+ <span class="label" id="l2">SET</span>+ </div>+ <div class="bar">+ <div class="fill c"></div>+ <span class="label" id="l3">FILL</span>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Bar 1 — sweeps left -> right, landing on the beat at ~0.55s.+ tl.to(".fill.a", { scaleX: 1, duration: 0.35, ease: "power2.out" }, 0.2);+ tl.set("#l1", { color: "var(--hg-bg)" }, 0.55);++ // Bar 2 — sweeps right -> left, landing at ~0.85s.+ tl.to(".fill.b", { scaleX: 1, duration: 0.35, ease: "power2.out" }, 0.5);+ tl.set("#l2", { color: "var(--hg-bg)" }, 0.85);++ // Bar 3 — sweeps left -> right, landing at ~1.15s.+ tl.to(".fill.c", { scaleX: 1, duration: 0.35, ease: "power2.out" }, 0.8);+ tl.set("#l3", { color: "var(--hg-bg)" }, 1.15);++ window.__timelines["directional-fill"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/dolly-zoom/index.html b/skills/music-to-video/references/motion-primitives/dolly-zoom/index.htmlindex 3b7f10beed..8140bf8f07 100644--- a/skills/music-to-video/references/motion-primitives/dolly-zoom/index.html+++ b/skills/music-to-video/references/motion-primitives/dolly-zoom/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,68 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .layers {- position: absolute;- inset: 0;- overflow: hidden;- }- .bg-far,- .bg-mid,- .bg-near {- position: absolute;- inset: 0;- will-change: transform, filter;- }- .bg-far {- background:- radial-gradient(2px 2px at 20% 30%, var(--hg-dim) 50%, transparent 51%),- radial-gradient(2px 2px at 70% 80%, var(--hg-dim) 50%, transparent 51%),- radial-gradient(1px 1px at 45% 60%, var(--hg-dim) 50%, transparent 51%),- radial-gradient(1px 1px at 85% 25%, var(--hg-dim) 50%, transparent 51%),- radial-gradient(2px 2px at 10% 75%, var(--hg-dim) 50%, transparent 51%),- radial-gradient(1px 1px at 60% 15%, var(--hg-dim) 50%, transparent 51%);- background-size: 400px 400px;- filter: blur(2px);- }- .bg-mid {- background:- linear-gradient(90deg, transparent 49.7%, rgba(168, 85, 247, 0.25) 50%, transparent 50.3%)- 0 0 / 200px 200px,- linear-gradient(- 180deg,- transparent 49.7%,- rgba(168, 85, 247, 0.15) 50%,- transparent 50.3%- )- 0 0 / 200px 200px;- }- .bg-near {- background:- radial-gradient(circle at 15% 50%, rgba(168, 85, 247, 0.4) 0%, transparent 25%),- radial-gradient(circle at 85% 50%, rgba(124, 58, 237, 0.4) 0%, transparent 25%);- }- .subject {- position: relative;- z-index: 5;- font-family: "Playfair Display", serif;- font-style: italic;- font-weight: 900;- font-size: 180px;- letter-spacing: -0.02em;- }</style></head><body>@@ -102,36 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="layers">- <div class="bg-far"></div>- <div class="bg-mid"></div>- <div class="bg-near"></div>- </div>- <div class="stage"><div class="subject">subject.</div></div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="dolly-zoom"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- tl.fromTo(- ".bg-far",- { scale: 1, filter: "blur(2px)" },- { scale: 1.6, filter: "blur(4px)", duration: 1.8, ease: "power2.inOut" },- 0.1,- );- tl.fromTo(".bg-mid", { scale: 1 }, { scale: 1.4, duration: 1.8, ease: "power2.inOut" }, 0.1);- tl.fromTo(".bg-near", { scale: 1 }, { scale: 1.2, duration: 1.8, ease: "power2.inOut" }, 0.1);- tl.fromTo(- ".subject",- { opacity: 0, scale: 1.1 },- { opacity: 1, scale: 1, duration: 0.6, ease: "power3.out" },- 0.15,- );- tl.to(".layers", { skewY: -0.5, duration: 1.8, ease: "power2.inOut" }, 0.1);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/dolly-zoom/scene.html b/skills/music-to-video/references/motion-primitives/dolly-zoom/scene.htmlnew file mode 100644index 0000000000..f148fa028e--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/dolly-zoom/scene.html@@ -0,0 +1,102 @@+<template id="dolly-zoom-template">+ <div data-composition-id="dolly-zoom" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .layers {+ position: absolute;+ inset: 0;+ overflow: hidden;+ }+ .bg-far,+ .bg-mid,+ .bg-near {+ position: absolute;+ inset: 0;+ will-change: transform, filter;+ }+ .bg-far {+ background:+ radial-gradient(2px 2px at 20% 30%, var(--hg-dim) 50%, transparent 51%),+ radial-gradient(2px 2px at 70% 80%, var(--hg-dim) 50%, transparent 51%),+ radial-gradient(1px 1px at 45% 60%, var(--hg-dim) 50%, transparent 51%),+ radial-gradient(1px 1px at 85% 25%, var(--hg-dim) 50%, transparent 51%),+ radial-gradient(2px 2px at 10% 75%, var(--hg-dim) 50%, transparent 51%),+ radial-gradient(1px 1px at 60% 15%, var(--hg-dim) 50%, transparent 51%);+ background-size: 400px 400px;+ filter: blur(2px);+ }+ .bg-mid {+ background:+ linear-gradient(90deg, transparent 49.7%, rgba(168, 85, 247, 0.25) 50%, transparent 50.3%)+ 0 0 / 200px 200px,+ linear-gradient(+ 180deg,+ transparent 49.7%,+ rgba(168, 85, 247, 0.15) 50%,+ transparent 50.3%+ )+ 0 0 / 200px 200px;+ }+ .bg-near {+ background:+ radial-gradient(circle at 15% 50%, rgba(168, 85, 247, 0.4) 0%, transparent 25%),+ radial-gradient(circle at 85% 50%, rgba(124, 58, 237, 0.4) 0%, transparent 25%);+ }+ .subject {+ position: relative;+ z-index: 5;+ font-family: "Playfair Display", serif;+ font-style: italic;+ font-weight: 900;+ font-size: 180px;+ letter-spacing: -0.02em;+ }+ </style>+ <div class="layers">+ <div class="bg-far"></div>+ <div class="bg-mid"></div>+ <div class="bg-near"></div>+ </div>+ <div class="stage"><div class="subject">subject.</div></div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.fromTo(+ ".bg-far",+ { scale: 1, filter: "blur(2px)" },+ { scale: 1.6, filter: "blur(4px)", duration: 1.8, ease: "power2.inOut" },+ 0.1,+ );+ tl.fromTo(".bg-mid", { scale: 1 }, { scale: 1.4, duration: 1.8, ease: "power2.inOut" }, 0.1);+ tl.fromTo(".bg-near", { scale: 1 }, { scale: 1.2, duration: 1.8, ease: "power2.inOut" }, 0.1);+ tl.fromTo(+ ".subject",+ { opacity: 0, scale: 1.1 },+ { opacity: 1, scale: 1, duration: 0.6, ease: "power3.out" },+ 0.15,+ );+ tl.to(".layers", { skewY: -0.5, duration: 1.8, ease: "power2.inOut" }, 0.1);++ window.__timelines["dolly-zoom"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/electric-arc/index.html b/skills/music-to-video/references/motion-primitives/electric-arc/index.htmlindex b2300236b1..4dc7735846 100644--- a/skills/music-to-video/references/motion-primitives/electric-arc/index.html+++ b/skills/music-to-video/references/motion-primitives/electric-arc/index.html@@ -14,11 +14,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -30,48 +25,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .arc-svg {- position: absolute;- inset: 0;- }- .arc-path {- fill: none;- stroke: var(--hg-fg);- stroke-width: 3;- stroke-linecap: round;- filter: drop-shadow(0 0 8px var(--hg-cyan)) drop-shadow(0 0 16px var(--hg-cyan));- stroke-dasharray: 1200;- stroke-dashoffset: 1200;- will-change: stroke-dashoffset, opacity;- }- .arc-flash {- position: absolute;- inset: 0;- background: radial-gradient(circle at 50% 50%, rgba(42, 255, 240, 0.3) 0%, transparent 40%);- opacity: 0;- will-change: opacity;- }- .arc-label {- font-weight: 900;- font-size: 240px;- letter-spacing: -0.04em;- color: var(--hg-fg);- position: relative;- z-index: 2;- }</style></head><body>@@ -83,62 +36,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="stage">- <svg class="arc-svg" viewBox="0 0 1920 1080" preserveAspectRatio="none">- <path- class="arc-path"- id="arc1"- d="M 200 540 L 380 480 L 440 580 L 620 500 L 720 600 L 880 510 L 960 540"- />- <path- class="arc-path"- id="arc2"- d="M 1720 540 L 1540 600 L 1480 500 L 1300 580 L 1200 480 L 1040 570 L 960 540"- />- <path- class="arc-path"- id="arc3"- d="M 960 200 L 920 360 L 1040 420 L 940 520 L 960 540"- />- </svg>- <div class="arc-flash"></div>- <div class="arc-label">CHARGE</div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="electric-arc"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- tl.fromTo(- ".arc-label",- { opacity: 0, scale: 0.9 },- { opacity: 1, scale: 1, duration: 0.3, ease: "power3.out" },- 0.5,- );- const arcs = ["#arc1", "#arc2", "#arc3"];- arcs.forEach((p, i) => {- tl.fromTo(- p,- { strokeDashoffset: 1200, opacity: 0 },- { strokeDashoffset: 0, opacity: 1, duration: 0.18, ease: "power4.out" },- 0.15 + i * 0.05,- );- });- tl.to(arcs.join(","), { opacity: 0.3, duration: 0.04, ease: "steps(1)" }, 0.55);- tl.to(arcs.join(","), { opacity: 1, duration: 0.04, ease: "steps(1)" }, 0.6);- tl.to(arcs.join(","), { opacity: 0.5, duration: 0.04, ease: "steps(1)" }, 0.7);- tl.to(arcs.join(","), { opacity: 1, duration: 0.04, ease: "steps(1)" }, 0.78);- tl.fromTo(- ".arc-flash",- { opacity: 0 },- { opacity: 1, duration: 0.06, ease: "steps(1)" },- 0.5,- );- tl.to(".arc-flash", { opacity: 0, duration: 0.5, ease: "power2.out" }, 0.6);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/electric-arc/scene.html b/skills/music-to-video/references/motion-primitives/electric-arc/scene.htmlnew file mode 100644index 0000000000..d43d624bdf--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/electric-arc/scene.html@@ -0,0 +1,105 @@+<template id="electric-arc-template">+ <div data-composition-id="electric-arc" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-cyan: #2afff0;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .arc-svg {+ position: absolute;+ inset: 0;+ }+ .arc-path {+ fill: none;+ stroke: var(--hg-fg);+ stroke-width: 3;+ stroke-linecap: round;+ filter: drop-shadow(0 0 8px var(--hg-cyan)) drop-shadow(0 0 16px var(--hg-cyan));+ stroke-dasharray: 1200;+ stroke-dashoffset: 1200;+ will-change: stroke-dashoffset, opacity;+ }+ .arc-flash {+ position: absolute;+ inset: 0;+ background: radial-gradient(circle at 50% 50%, rgba(42, 255, 240, 0.3) 0%, transparent 40%);+ opacity: 0;+ will-change: opacity;+ }+ .arc-label {+ font-weight: 900;+ font-size: 240px;+ letter-spacing: -0.04em;+ color: var(--hg-fg);+ position: relative;+ z-index: 2;+ }+ </style>+ <div class="stage">+ <svg class="arc-svg" viewBox="0 0 1920 1080" preserveAspectRatio="none">+ <path+ class="arc-path"+ id="arc1"+ d="M 200 540 L 380 480 L 440 580 L 620 500 L 720 600 L 880 510 L 960 540"+ />+ <path+ class="arc-path"+ id="arc2"+ d="M 1720 540 L 1540 600 L 1480 500 L 1300 580 L 1200 480 L 1040 570 L 960 540"+ />+ <path class="arc-path" id="arc3" d="M 960 200 L 920 360 L 1040 420 L 940 520 L 960 540" />+ </svg>+ <div class="arc-flash"></div>+ <div class="arc-label">CHARGE</div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.fromTo(+ ".arc-label",+ { opacity: 0, scale: 0.9 },+ { opacity: 1, scale: 1, duration: 0.3, ease: "power3.out" },+ 0.5,+ );+ const arcs = ["#arc1", "#arc2", "#arc3"];+ arcs.forEach((p, i) => {+ tl.fromTo(+ p,+ { strokeDashoffset: 1200, opacity: 0 },+ { strokeDashoffset: 0, opacity: 1, duration: 0.18, ease: "power4.out" },+ 0.15 + i * 0.05,+ );+ });+ tl.to(arcs.join(","), { opacity: 0.3, duration: 0.04, ease: "steps(1)" }, 0.55);+ tl.to(arcs.join(","), { opacity: 1, duration: 0.04, ease: "steps(1)" }, 0.6);+ tl.to(arcs.join(","), { opacity: 0.5, duration: 0.04, ease: "steps(1)" }, 0.7);+ tl.to(arcs.join(","), { opacity: 1, duration: 0.04, ease: "steps(1)" }, 0.78);+ tl.fromTo(+ ".arc-flash",+ { opacity: 0 },+ { opacity: 1, duration: 0.06, ease: "steps(1)" },+ 0.5,+ );+ tl.to(".arc-flash", { opacity: 0, duration: 0.5, ease: "power2.out" }, 0.6);++ window.__timelines["electric-arc"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/flash-cut/index.html b/skills/music-to-video/references/motion-primitives/flash-cut/index.htmlindex fad3ae2293..9780b63c86 100644--- a/skills/music-to-video/references/motion-primitives/flash-cut/index.html+++ b/skills/music-to-video/references/motion-primitives/flash-cut/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,46 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .word {- position: absolute;- font-weight: 900;- font-size: 260px;- letter-spacing: -0.04em;- line-height: 0.95;- white-space: nowrap;- color: var(--hg-fg);- will-change: opacity;- }- .accent {- position: absolute;- bottom: 360px;- width: 220px;- height: 14px;- border-radius: 999px;- background: var(--hg-violet);- will-change: background, transform;- }- .flash {- position: absolute;- inset: 0;- background: #ffffff;- opacity: 0;- pointer-events: none;- will-change: opacity;- }</style></head><body>@@ -80,53 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="1.8" data-track-index="1">- <div class="stage">- <div class="accent" id="accent"></div>- <div class="word" id="w0">READY</div>- <div class="word" id="w1">IMPACT</div>- <div class="word" id="w2">DONE</div>- </div>- <div class="flash" id="flash"></div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="flash-cut"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="1.8"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- // Initial state: first word visible, others hidden, accent violet.- tl.set("#w0", { opacity: 1 }, 0);- tl.set("#w1", { opacity: 0 }, 0);- tl.set("#w2", { opacity: 0 }, 0);- tl.set("#accent", { backgroundColor: "#7c3aed", scaleX: 1 }, 0);- tl.set("#flash", { opacity: 0 }, 0);-- // Two hits; during each white frame, swap underlying word + accent colour.- const hits = [- { t: 0.5, from: "#w0", to: "#w1", color: "#a855f7", scaleX: 1.45 },- { t: 1.2, from: "#w1", to: "#w2", color: "#f5f5fa", scaleX: 0.7 },- ];-- hits.forEach((h) => {- // Instant full-frame white flash on the hit.- tl.set("#flash", { opacity: 1 }, h.t);- // While white (~2 frames at 30fps), swap the revealed state.- tl.set(h.from, { opacity: 0 }, h.t + 0.03);- tl.set(h.to, { opacity: 1 }, h.t + 0.03);- tl.set("#accent", { backgroundColor: h.color, scaleX: h.scaleX }, h.t + 0.03);- // Snap the flash back out within ~3 frames.- tl.set("#flash", { opacity: 0 }, h.t + 0.06);- });-- // Graceful loop: dip back to white at the very end and restore the start- // state so the cycle re-enters cleanly on the next pass.- tl.set("#flash", { opacity: 1 }, 1.74);- tl.set("#w2", { opacity: 0 }, 1.77);- tl.set("#w0", { opacity: 1 }, 1.77);- tl.set("#accent", { backgroundColor: "#7c3aed", scaleX: 1 }, 1.77);- tl.set("#flash", { opacity: 0 }, 1.8);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/flash-cut/scene.html b/skills/music-to-video/references/motion-primitives/flash-cut/scene.htmlnew file mode 100644index 0000000000..be05a2a7bc--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/flash-cut/scene.html@@ -0,0 +1,97 @@+<template id="flash-cut-template">+ <div data-composition-id="flash-cut" data-width="1920" data-height="1080" data-duration="1.8">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .word {+ position: absolute;+ font-weight: 900;+ font-size: 260px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ white-space: nowrap;+ color: var(--hg-fg);+ will-change: opacity;+ }+ .accent {+ position: absolute;+ bottom: 360px;+ width: 220px;+ height: 14px;+ border-radius: 999px;+ background: var(--hg-violet);+ will-change: background, transform;+ }+ .flash {+ position: absolute;+ inset: 0;+ background: #ffffff;+ opacity: 0;+ pointer-events: none;+ will-change: opacity;+ }+ </style>+ <div class="stage">+ <div class="accent" id="accent"></div>+ <div class="word" id="w0">READY</div>+ <div class="word" id="w1">IMPACT</div>+ <div class="word" id="w2">DONE</div>+ </div>+ <div class="flash" id="flash"></div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Initial state: first word visible, others hidden, accent violet.+ tl.set("#w0", { opacity: 1 }, 0);+ tl.set("#w1", { opacity: 0 }, 0);+ tl.set("#w2", { opacity: 0 }, 0);+ tl.set("#accent", { backgroundColor: "#7c3aed", scaleX: 1 }, 0);+ tl.set("#flash", { opacity: 0 }, 0);++ // Two hits; during each white frame, swap underlying word + accent colour.+ const hits = [+ { t: 0.5, from: "#w0", to: "#w1", color: "#a855f7", scaleX: 1.45 },+ { t: 1.2, from: "#w1", to: "#w2", color: "#f5f5fa", scaleX: 0.7 },+ ];++ hits.forEach((h) => {+ // Instant full-frame white flash on the hit.+ tl.set("#flash", { opacity: 1 }, h.t);+ // While white (~2 frames at 30fps), swap the revealed state.+ tl.set(h.from, { opacity: 0 }, h.t + 0.03);+ tl.set(h.to, { opacity: 1 }, h.t + 0.03);+ tl.set("#accent", { backgroundColor: h.color, scaleX: h.scaleX }, h.t + 0.03);+ // Snap the flash back out within ~3 frames.+ tl.set("#flash", { opacity: 0 }, h.t + 0.06);+ });++ // Graceful loop: dip back to white at the very end and restore the start+ // state so the cycle re-enters cleanly on the next pass.+ tl.set("#flash", { opacity: 1 }, 1.74);+ tl.set("#w2", { opacity: 0 }, 1.77);+ tl.set("#w0", { opacity: 1 }, 1.77);+ tl.set("#accent", { backgroundColor: "#7c3aed", scaleX: 1 }, 1.77);+ tl.set("#flash", { opacity: 0 }, 1.8);++ window.__timelines["flash-cut"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/gooey-metaball/index.html b/skills/music-to-video/references/motion-primitives/gooey-metaball/index.htmlindex c247a50368..fa0202647a 100644--- a/skills/music-to-video/references/motion-primitives/gooey-metaball/index.html+++ b/skills/music-to-video/references/motion-primitives/gooey-metaball/index.html@@ -14,11 +14,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -30,64 +25,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .hero {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- font-weight: 900;- font-size: 280px;- letter-spacing: -0.04em;- color: var(--hg-fg);- z-index: 5;- pointer-events: none;- }- .gooey-stage {- position: absolute;- inset: 0;- filter: url(#gooey-filter);- }- .ball {- position: absolute;- border-radius: 50%;- background: var(--hg-violet-2);- top: 50%;- left: 50%;- will-change: transform;- opacity: 0;- }- .ball.a {- width: 280px;- height: 280px;- background: #7c3aed;- }- .ball.b {- width: 240px;- height: 240px;- background: #a855f7;- }- .ball.c {- width: 200px;- height: 200px;- background: #d946ef;- }- .ball.d {- width: 320px;- height: 320px;- background: #8b5cf6;- }- .ball.e {- width: 180px;- height: 180px;- background: #c084fc;- }</style></head><body>@@ -99,143 +36,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <svg style="position: absolute; width: 0; height: 0">- <defs>- <filter id="gooey-filter">- <feGaussianBlur in="SourceGraphic" stdDeviation="20" result="blur" />- <feColorMatrix- in="blur"- mode="matrix"- values="- 1 0 0 0 0- 0 1 0 0 0- 0 0 1 0 0- 0 0 0 22 -10"- result="gooey"- />- <feComposite in="SourceGraphic" in2="gooey" operator="atop" />- </filter>- </defs>- </svg>-- <div class="gooey-stage">- <div class="ball a" id="ballA"></div>- <div class="ball b" id="ballB"></div>- <div class="ball c" id="ballC"></div>- <div class="ball d" id="ballD"></div>- <div class="ball e" id="ballE"></div>- </div>-- <div class="hero">GOOEY</div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="gooey-metaball"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- // Initial: all balls collapsed at center- ["#ballA", "#ballB", "#ballC", "#ballD", "#ballE"].forEach((id) => {- tl.set(id, { xPercent: -50, yPercent: -50, scale: 0, opacity: 0 }, 0);- });- // Spawn outward- tl.to(- "#ballA",- {- xPercent: -50 - 120,- yPercent: -50 + 20,- scale: 1,- opacity: 1,- duration: 0.5,- ease: "back.out(1.6)",- },- 0.15,- );- tl.to(- "#ballB",- {- xPercent: -50 + 100,- yPercent: -50 + 50,- scale: 1,- opacity: 1,- duration: 0.55,- ease: "back.out(1.6)",- },- 0.2,- );- tl.to(- "#ballC",- {- xPercent: -50 + 30,- yPercent: -50 - 80,- scale: 1,- opacity: 1,- duration: 0.55,- ease: "back.out(1.6)",- },- 0.25,- );- tl.to(- "#ballD",- {- xPercent: -50 - 50,- yPercent: -50 - 30,- scale: 1,- opacity: 1,- duration: 0.55,- ease: "back.out(1.6)",- },- 0.3,- );- tl.to(- "#ballE",- {- xPercent: -50 + 80,- yPercent: -50 - 40,- scale: 1,- opacity: 1,- duration: 0.55,- ease: "back.out(1.6)",- },- 0.18,- );-- // Idle drift- tl.to(- "#ballA",- { xPercent: "+=20", yPercent: "+=12", duration: 1.0, ease: "sine.inOut" },- 0.7,- );- tl.to(- "#ballB",- { xPercent: "-=18", yPercent: "-=10", duration: 1.0, ease: "sine.inOut" },- 0.7,- );- tl.to(- "#ballC",- { xPercent: "-=15", yPercent: "+=20", duration: 1.0, ease: "sine.inOut" },- 0.7,- );- tl.to(- "#ballD",- { xPercent: "+=25", yPercent: "+=8", duration: 1.0, ease: "sine.inOut" },- 0.7,- );- tl.to(- "#ballE",- { xPercent: "-=22", yPercent: "+=18", duration: 1.0, ease: "sine.inOut" },- 0.7,- );-- // Reveal text behind- tl.fromTo(- ".hero",- { opacity: 0, scale: 0.95 },- { opacity: 1, scale: 1, duration: 0.5, ease: "power3.out" },- 0.6,- );-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/gooey-metaball/scene.html b/skills/music-to-video/references/motion-primitives/gooey-metaball/scene.htmlnew file mode 100644index 0000000000..234095eccc--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/gooey-metaball/scene.html@@ -0,0 +1,206 @@+<template id="gooey-metaball-template">+ <div data-composition-id="gooey-metaball" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-cyan: #2afff0;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .hero {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ color: var(--hg-fg);+ z-index: 5;+ pointer-events: none;+ }+ .gooey-stage {+ position: absolute;+ inset: 0;+ filter: url(#gooey-filter);+ }+ .ball {+ position: absolute;+ border-radius: 50%;+ background: var(--hg-violet-2);+ top: 50%;+ left: 50%;+ will-change: transform;+ opacity: 0;+ }+ .ball.a {+ width: 280px;+ height: 280px;+ background: #7c3aed;+ }+ .ball.b {+ width: 240px;+ height: 240px;+ background: #a855f7;+ }+ .ball.c {+ width: 200px;+ height: 200px;+ background: #d946ef;+ }+ .ball.d {+ width: 320px;+ height: 320px;+ background: #8b5cf6;+ }+ .ball.e {+ width: 180px;+ height: 180px;+ background: #c084fc;+ }+ </style>+ <svg style="position: absolute; width: 0; height: 0">+ <defs>+ <filter id="gooey-filter">+ <feGaussianBlur in="SourceGraphic" stdDeviation="20" result="blur" />+ <feColorMatrix+ in="blur"+ mode="matrix"+ values="+ 1 0 0 0 0+ 0 1 0 0 0+ 0 0 1 0 0+ 0 0 0 22 -10"+ result="gooey"+ />+ <feComposite in="SourceGraphic" in2="gooey" operator="atop" />+ </filter>+ </defs>+ </svg>++ <div class="gooey-stage">+ <div class="ball a" id="ballA"></div>+ <div class="ball b" id="ballB"></div>+ <div class="ball c" id="ballC"></div>+ <div class="ball d" id="ballD"></div>+ <div class="ball e" id="ballE"></div>+ </div>++ <div class="hero">GOOEY</div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Initial: all balls collapsed at center+ ["#ballA", "#ballB", "#ballC", "#ballD", "#ballE"].forEach((id) => {+ tl.set(id, { xPercent: -50, yPercent: -50, scale: 0, opacity: 0 }, 0);+ });+ // Spawn outward+ tl.to(+ "#ballA",+ {+ xPercent: -50 - 120,+ yPercent: -50 + 20,+ scale: 1,+ opacity: 1,+ duration: 0.5,+ ease: "back.out(1.6)",+ },+ 0.15,+ );+ tl.to(+ "#ballB",+ {+ xPercent: -50 + 100,+ yPercent: -50 + 50,+ scale: 1,+ opacity: 1,+ duration: 0.55,+ ease: "back.out(1.6)",+ },+ 0.2,+ );+ tl.to(+ "#ballC",+ {+ xPercent: -50 + 30,+ yPercent: -50 - 80,+ scale: 1,+ opacity: 1,+ duration: 0.55,+ ease: "back.out(1.6)",+ },+ 0.25,+ );+ tl.to(+ "#ballD",+ {+ xPercent: -50 - 50,+ yPercent: -50 - 30,+ scale: 1,+ opacity: 1,+ duration: 0.55,+ ease: "back.out(1.6)",+ },+ 0.3,+ );+ tl.to(+ "#ballE",+ {+ xPercent: -50 + 80,+ yPercent: -50 - 40,+ scale: 1,+ opacity: 1,+ duration: 0.55,+ ease: "back.out(1.6)",+ },+ 0.18,+ );++ // Idle drift+ tl.to(+ "#ballA",+ { xPercent: "+=20", yPercent: "+=12", duration: 1.0, ease: "sine.inOut" },+ 0.7,+ );+ tl.to(+ "#ballB",+ { xPercent: "-=18", yPercent: "-=10", duration: 1.0, ease: "sine.inOut" },+ 0.7,+ );+ tl.to(+ "#ballC",+ { xPercent: "-=15", yPercent: "+=20", duration: 1.0, ease: "sine.inOut" },+ 0.7,+ );+ tl.to(+ "#ballD",+ { xPercent: "+=25", yPercent: "+=8", duration: 1.0, ease: "sine.inOut" },+ 0.7,+ );+ tl.to(+ "#ballE",+ { xPercent: "-=22", yPercent: "+=18", duration: 1.0, ease: "sine.inOut" },+ 0.7,+ );++ // Reveal text behind+ tl.fromTo(+ ".hero",+ { opacity: 0, scale: 0.95 },+ { opacity: 1, scale: 1, duration: 0.5, ease: "power3.out" },+ 0.6,+ );++ window.__timelines["gooey-metaball"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/hard-cut/index.html b/skills/music-to-video/references/motion-primitives/hard-cut/index.htmlindex b306c657b3..998ca41fa9 100644--- a/skills/music-to-video/references/motion-primitives/hard-cut/index.html+++ b/skills/music-to-video/references/motion-primitives/hard-cut/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,33 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- }- .panel {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- opacity: 0;- will-change: opacity;- }- .word {- font-weight: 900;- font-size: 340px;- letter-spacing: -0.05em;- line-height: 0.9;- text-transform: uppercase;- white-space: nowrap;- }</style></head><body>@@ -67,51 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="stage" id="stage"></div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="hard-cut"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- // Deterministic palette + word list. Variation is derived from index only.- const BG = ["#7c3aed", "#0a0a0f", "#ff2a4a", "#2afff0", "#a855f7", "#f5f5fa", "#0a0a0f"];- const FG = ["#f5f5fa", "#a855f7", "#0a0a0f", "#0a0a0f", "#0a0a0f", "#7c3aed", "#f5f5fa"];- const WORDS = ["CUT", "NOW", "HARD", "SNAP", "STOP", "GO", "CUT"];- const STEP = 0.28; // beat interval- const N = WORDS.length;-- // Build one full-frame panel per cut, all hidden but the first.- const stage = document.getElementById("stage");- for (let i = 0; i < N; i++) {- const panel = document.createElement("div");- panel.className = "panel";- panel.id = "p" + i;- panel.style.background = BG[i];- panel.style.opacity = i === 0 ? "1" : "0";- const word = document.createElement("div");- word.className = "word";- word.style.color = FG[i];- word.textContent = WORDS[i];- panel.appendChild(word);- stage.appendChild(panel);- }-- // Sample-accurate 0ms cuts: at each beat, hide current panel, show next.- // tl.set has no duration and no ease — brutal instant switching.- for (let i = 1; i < N; i++) {- const t = i * STEP;- tl.set("#p" + (i - 1), { opacity: 0 }, t);- tl.set("#p" + i, { opacity: 1 }, t);- }-- // Loop gracefully: snap back to the first panel before the clip ends so a- // re-entry starts clean on the same color/word it began with.- tl.set("#p" + (N - 1), { opacity: 0 }, N * STEP);- tl.set("#p0", { opacity: 1 }, N * STEP);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/hard-cut/scene.html b/skills/music-to-video/references/motion-primitives/hard-cut/scene.htmlnew file mode 100644index 0000000000..ce5bf782c6--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/hard-cut/scene.html@@ -0,0 +1,82 @@+<template id="hard-cut-template">+ <div data-composition-id="hard-cut" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ }+ .panel {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ opacity: 0;+ will-change: opacity;+ }+ .word {+ font-weight: 900;+ font-size: 340px;+ letter-spacing: -0.05em;+ line-height: 0.9;+ text-transform: uppercase;+ white-space: nowrap;+ }+ </style>+ <div class="stage" id="stage"></div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Deterministic palette + word list. Variation is derived from index only.+ const BG = ["#7c3aed", "#0a0a0f", "#ff2a4a", "#2afff0", "#a855f7", "#f5f5fa", "#0a0a0f"];+ const FG = ["#f5f5fa", "#a855f7", "#0a0a0f", "#0a0a0f", "#0a0a0f", "#7c3aed", "#f5f5fa"];+ const WORDS = ["CUT", "NOW", "HARD", "SNAP", "STOP", "GO", "CUT"];+ const STEP = 0.28; // beat interval+ const N = WORDS.length;++ // Build one full-frame panel per cut, all hidden but the first.+ const stage = document.getElementById("stage");+ for (let i = 0; i < N; i++) {+ const panel = document.createElement("div");+ panel.className = "panel";+ panel.id = "p" + i;+ panel.style.background = BG[i];+ panel.style.opacity = i === 0 ? "1" : "0";+ const word = document.createElement("div");+ word.className = "word";+ word.style.color = FG[i];+ word.textContent = WORDS[i];+ panel.appendChild(word);+ stage.appendChild(panel);+ }++ // Sample-accurate 0ms cuts: at each beat, hide current panel, show next.+ // tl.set has no duration and no ease — brutal instant switching.+ for (let i = 1; i < N; i++) {+ const t = i * STEP;+ tl.set("#p" + (i - 1), { opacity: 0 }, t);+ tl.set("#p" + i, { opacity: 1 }, t);+ }++ // Loop gracefully: snap back to the first panel before the clip ends so a+ // re-entry starts clean on the same color/word it began with.+ tl.set("#p" + (N - 1), { opacity: 0 }, N * STEP);+ tl.set("#p0", { opacity: 1 }, N * STEP);++ window.__timelines["hard-cut"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/hypercut-whip/index.html b/skills/music-to-video/references/motion-primitives/hypercut-whip/index.htmlindex 853e56bd2b..5388f6edc4 100644--- a/skills/music-to-video/references/motion-primitives/hypercut-whip/index.html+++ b/skills/music-to-video/references/motion-primitives/hypercut-whip/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,28 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .hero {- font-weight: 900;- font-size: 280px;- letter-spacing: -0.04em;- line-height: 0.95;- color: var(--hg-fg);- white-space: nowrap;- will-change: transform, filter;- }</style></head><body>@@ -62,18 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="stage"><div class="hero" id="hero">HYPERCUT</div></div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="hypercut-whip"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- tl.set("#hero", { x: 0, filter: "blur(0px)" }, 0);- tl.to("#hero", { x: 1800, filter: "blur(30px)", duration: 0.18, ease: "power4.in" }, 1.65);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/hypercut-whip/scene.html b/skills/music-to-video/references/motion-primitives/hypercut-whip/scene.htmlnew file mode 100644index 0000000000..b0332a6804--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/hypercut-whip/scene.html@@ -0,0 +1,44 @@+<template id="hypercut-whip-template">+ <div data-composition-id="hypercut-whip" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .hero {+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ color: var(--hg-fg);+ white-space: nowrap;+ will-change: transform, filter;+ }+ </style>+ <div class="stage"><div class="hero" id="hero">HYPERCUT</div></div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.set("#hero", { x: 0, filter: "blur(0px)" }, 0);+ tl.to("#hero", { x: 1800, filter: "blur(30px)", duration: 0.18, ease: "power4.in" }, 1.65);++ window.__timelines["hypercut-whip"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/iris-open/index.html b/skills/music-to-video/references/motion-primitives/iris-open/index.htmlindex 185f998096..817a3312cc 100644--- a/skills/music-to-video/references/motion-primitives/iris-open/index.html+++ b/skills/music-to-video/references/motion-primitives/iris-open/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,39 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .iris-stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- clip-path: circle(0% at 50% 50%);- will-change: clip-path;- background: linear-gradient(135deg, #1a0033 0%, #0a0a0f 60%);- }- .iris-stage .hero {- font-family: "Playfair Display", serif;- font-weight: 900;- font-size: 280px;- letter-spacing: -0.04em;- line-height: 0.95;- color: var(--hg-fg);- white-space: nowrap;- }- .iris-ring {- position: absolute;- border-radius: 50%;- border: 2px solid var(--hg-violet);- box-shadow: 0 0 40px var(--hg-violet);- opacity: 0;- will-change: transform, opacity;- }</style></head><body>@@ -73,32 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="iris-stage">- <div class="iris-ring" style="width: 200px; height: 200px"></div>- <div class="hero">IRIS</div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="iris-open"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- tl.set(".iris-stage", { clipPath: "circle(0% at 50% 50%)" }, 0);- tl.fromTo(- ".iris-ring",- { scale: 0, opacity: 0.9 },- { scale: 9, opacity: 0, duration: 0.85, ease: "expo.out" },- 0.2,- );- tl.to(- ".iris-stage",- { clipPath: "circle(75% at 50% 50%)", duration: 0.9, ease: "expo.out" },- 0.3,- );- tl.from(".iris-stage .hero", { y: 40, opacity: 0, duration: 0.6, ease: "power3.out" }, 0.6);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/iris-open/scene.html b/skills/music-to-video/references/motion-primitives/iris-open/scene.htmlnew file mode 100644index 0000000000..0975a92882--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/iris-open/scene.html@@ -0,0 +1,69 @@+<template id="iris-open-template">+ <div data-composition-id="iris-open" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .iris-stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ clip-path: circle(0% at 50% 50%);+ will-change: clip-path;+ background: linear-gradient(135deg, #1a0033 0%, #0a0a0f 60%);+ }+ .iris-stage .hero {+ font-family: "Playfair Display", serif;+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ color: var(--hg-fg);+ white-space: nowrap;+ }+ .iris-ring {+ position: absolute;+ border-radius: 50%;+ border: 2px solid var(--hg-violet);+ box-shadow: 0 0 40px var(--hg-violet);+ opacity: 0;+ will-change: transform, opacity;+ }+ </style>+ <div class="iris-stage">+ <div class="iris-ring" style="width: 200px; height: 200px"></div>+ <div class="hero">IRIS</div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.set(".iris-stage", { clipPath: "circle(0% at 50% 50%)" }, 0);+ tl.fromTo(+ ".iris-ring",+ { scale: 0, opacity: 0.9 },+ { scale: 9, opacity: 0, duration: 0.85, ease: "expo.out" },+ 0.2,+ );+ tl.to(+ ".iris-stage",+ { clipPath: "circle(75% at 50% 50%)", duration: 0.9, ease: "expo.out" },+ 0.3,+ );+ tl.from(".iris-stage .hero", { y: 40, opacity: 0, duration: 0.6, ease: "power3.out" }, 0.6);++ window.__timelines["iris-open"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/kinetic-letter-in/index.html b/skills/music-to-video/references/motion-primitives/kinetic-letter-in/index.htmlindex ef040380a3..c6c02e1dcf 100644--- a/skills/music-to-video/references/motion-primitives/kinetic-letter-in/index.html+++ b/skills/music-to-video/references/motion-primitives/kinetic-letter-in/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,31 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .hero {- font-weight: 900;- font-size: 280px;- letter-spacing: -0.04em;- line-height: 0.95;- color: var(--hg-fg);- white-space: nowrap;- }- .char {- display: inline-block;- will-change: transform, opacity;- }</style></head><body>@@ -65,34 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="stage">- <div class="hero" id="hero">- <span class="char">K</span><span class="char">I</span><span class="char">N</span- ><span class="char">E</span><span class="char">T</span><span class="char">I</span- ><span class="char">C</span>- </div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="kinetic-letter-in"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- tl.from(- ".char",- { y: 80, opacity: 0, stagger: 0.045, ease: "back.out(2)", duration: 0.55 },- 0.05,- );- // Letters loosen apart as they settle. Animate each glyph's x (a transform), NOT the- // word's letter-spacing: animating letter-spacing reflows text and snaps glyph positions- // to the pixel grid, which micro-stutters on a slow settle under the seek-by-frame- // capture engine (the gsap_non_transform_motion lint rule flags it). The chars are- // already per-glyph spans, so spread them directly: (0.04em − (−0.04em)) × 280px = 22.4px- // per gap, centered about index 3 of the 7-letter word.- tl.to(".char", { x: (i) => (i - 3) * 22.4, duration: 0.6, ease: "power2.out" }, 0.7);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/kinetic-letter-in/scene.html b/skills/music-to-video/references/motion-primitives/kinetic-letter-in/scene.htmlnew file mode 100644index 0000000000..a391407b29--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/kinetic-letter-in/scene.html@@ -0,0 +1,64 @@+<template id="kinetic-letter-in-template">+ <div+ data-composition-id="kinetic-letter-in"+ data-width="1920"+ data-height="1080"+ data-duration="2"+ >+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .hero {+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ color: var(--hg-fg);+ white-space: nowrap;+ }+ .char {+ display: inline-block;+ will-change: transform, opacity;+ }+ </style>+ <div class="stage">+ <div class="hero" id="hero">+ <span class="char">K</span><span class="char">I</span><span class="char">N</span+ ><span class="char">E</span><span class="char">T</span><span class="char">I</span+ ><span class="char">C</span>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.from(+ ".char",+ { y: 80, opacity: 0, stagger: 0.045, ease: "back.out(2)", duration: 0.55 },+ 0.05,+ );+ // Loosen the letters with a per-glyph x transform; animating letter-spacing reflows text+ // and stutters under seek-by-frame capture.+ tl.to(".char", { x: (i) => (i - 3) * 22.4, duration: 0.6, ease: "power2.out" }, 0.7);++ window.__timelines["kinetic-letter-in"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/liquid-morph/index.html b/skills/music-to-video/references/motion-primitives/liquid-morph/index.htmlindex 7d6860fd40..bd6d77bb68 100644--- a/skills/music-to-video/references/motion-primitives/liquid-morph/index.html+++ b/skills/music-to-video/references/motion-primitives/liquid-morph/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,64 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .blob-wrap {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .blob {- position: absolute;- width: 1100px;- height: 800px;- background: linear-gradient(135deg, #7c3aed 0%, #a855f7 60%, #d946ef 100%);- clip-path: polygon(- 50% 5%,- 65% 8%,- 78% 16%,- 88% 30%,- 92% 50%,- 88% 70%,- 78% 84%,- 65% 92%,- 50% 95%,- 35% 92%,- 22% 84%,- 12% 70%,- 8% 50%,- 12% 30%,- 22% 16%,- 35% 8%- );- will-change: clip-path, transform;- filter: blur(0.5px);- }- .hero {- font-family: "Playfair Display", serif;- font-style: italic;- font-weight: 900;- font-size: 280px;- letter-spacing: -0.04em;- color: var(--hg-fg);- white-space: nowrap;- position: relative;- z-index: 2;- mix-blend-mode: difference;- }</style></head><body>@@ -98,34 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="blob-wrap"><div class="blob"></div></div>- <div class="stage"><div class="hero">liquid</div></div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="liquid-morph"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- const BLOB_A =- "polygon(50% 5%, 65% 8%, 78% 16%, 88% 30%, 92% 50%, 88% 70%, 78% 84%, 65% 92%, 50% 95%, 35% 92%, 22% 84%, 12% 70%, 8% 50%, 12% 30%, 22% 16%, 35% 8%)";- const BLOB_B =- "polygon(38% 10%, 58% 4%, 75% 14%, 90% 28%, 95% 46%, 86% 60%, 80% 78%, 62% 88%, 46% 94%, 30% 86%, 16% 74%, 6% 58%, 10% 40%, 20% 22%, 30% 14%, 38% 10%)";- const BLOB_C =- "polygon(46% 8%, 62% 10%, 80% 20%, 92% 36%, 90% 52%, 92% 70%, 76% 86%, 58% 90%, 44% 94%, 28% 88%, 14% 76%, 10% 60%, 12% 44%, 18% 26%, 30% 12%, 38% 8%)";-- tl.set(".blob", { clipPath: BLOB_A, scale: 0.95 }, 0);- tl.to(".blob", { clipPath: BLOB_B, scale: 1.05, duration: 0.7, ease: "power2.inOut" }, 0.2);- tl.to(".blob", { clipPath: BLOB_C, scale: 1.0, duration: 0.7, ease: "power2.inOut" }, 0.9);- tl.fromTo(- ".hero",- { opacity: 0, y: 30 },- { opacity: 1, y: 0, duration: 0.6, ease: "power3.out" },- 0.4,- );- tl.to(".blob", { rotation: 6, duration: 1.5, ease: "sine.inOut" }, 0.2);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/liquid-morph/scene.html b/skills/music-to-video/references/motion-primitives/liquid-morph/scene.htmlnew file mode 100644index 0000000000..9d6cc06271--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/liquid-morph/scene.html@@ -0,0 +1,96 @@+<template id="liquid-morph-template">+ <div data-composition-id="liquid-morph" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .blob-wrap {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .blob {+ position: absolute;+ width: 1100px;+ height: 800px;+ background: linear-gradient(135deg, #7c3aed 0%, #a855f7 60%, #d946ef 100%);+ clip-path: polygon(+ 50% 5%,+ 65% 8%,+ 78% 16%,+ 88% 30%,+ 92% 50%,+ 88% 70%,+ 78% 84%,+ 65% 92%,+ 50% 95%,+ 35% 92%,+ 22% 84%,+ 12% 70%,+ 8% 50%,+ 12% 30%,+ 22% 16%,+ 35% 8%+ );+ will-change: clip-path, transform;+ filter: blur(0.5px);+ }+ .hero {+ font-family: "Playfair Display", serif;+ font-style: italic;+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ color: var(--hg-fg);+ white-space: nowrap;+ position: relative;+ z-index: 2;+ mix-blend-mode: difference;+ }+ </style>+ <div class="blob-wrap"><div class="blob"></div></div>+ <div class="stage"><div class="hero">liquid</div></div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ const BLOB_A =+ "polygon(50% 5%, 65% 8%, 78% 16%, 88% 30%, 92% 50%, 88% 70%, 78% 84%, 65% 92%, 50% 95%, 35% 92%, 22% 84%, 12% 70%, 8% 50%, 12% 30%, 22% 16%, 35% 8%)";+ const BLOB_B =+ "polygon(38% 10%, 58% 4%, 75% 14%, 90% 28%, 95% 46%, 86% 60%, 80% 78%, 62% 88%, 46% 94%, 30% 86%, 16% 74%, 6% 58%, 10% 40%, 20% 22%, 30% 14%, 38% 10%)";+ const BLOB_C =+ "polygon(46% 8%, 62% 10%, 80% 20%, 92% 36%, 90% 52%, 92% 70%, 76% 86%, 58% 90%, 44% 94%, 28% 88%, 14% 76%, 10% 60%, 12% 44%, 18% 26%, 30% 12%, 38% 8%)";++ tl.set(".blob", { clipPath: BLOB_A, scale: 0.95 }, 0);+ tl.to(".blob", { clipPath: BLOB_B, scale: 1.05, duration: 0.7, ease: "power2.inOut" }, 0.2);+ tl.to(".blob", { clipPath: BLOB_C, scale: 1.0, duration: 0.7, ease: "power2.inOut" }, 0.9);+ tl.fromTo(+ ".hero",+ { opacity: 0, y: 30 },+ { opacity: 1, y: 0, duration: 0.6, ease: "power3.out" },+ 0.4,+ );+ tl.to(".blob", { rotation: 6, duration: 1.5, ease: "sine.inOut" }, 0.2);++ window.__timelines["liquid-morph"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/mask-reveal/index.html b/skills/music-to-video/references/motion-primitives/mask-reveal/index.htmlindex d3692be51e..22f6d0cf95 100644--- a/skills/music-to-video/references/motion-primitives/mask-reveal/index.html+++ b/skills/music-to-video/references/motion-primitives/mask-reveal/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,49 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .hero {- font-weight: 900;- font-size: 280px;- letter-spacing: -0.04em;- line-height: 0.95;- color: var(--hg-fg);- white-space: nowrap;- }- .mask-wrap {- position: relative;- overflow: hidden;- padding: 0 60px;- }- .mask-clip {- clip-path: inset(0 100% 0 0);- will-change: clip-path;- }- .sweep {- position: absolute;- top: 0;- bottom: 0;- width: 8px;- background: var(--hg-violet);- box-shadow:- 0 0 40px var(--hg-violet),- 0 0 80px var(--hg-violet);- left: 0;- opacity: 0;- will-change: transform, opacity;- }</style></head><body>@@ -83,27 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="stage">- <div class="mask-wrap">- <div class="hero mask-clip">REVEAL</div>- <div class="sweep"></div>- </div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="mask-reveal"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- tl.set(".mask-clip", { clipPath: "inset(0 100% 0 0)" }, 0);- tl.set(".sweep", { x: 0, opacity: 0 }, 0);- tl.to(".sweep", { opacity: 1, duration: 0.08, ease: "power2.out" }, 0.1);- tl.to(".sweep", { x: 1300, duration: 0.75, ease: "expo.out" }, 0.15);- tl.to(".mask-clip", { clipPath: "inset(0 0% 0 0)", duration: 0.75, ease: "expo.out" }, 0.18);- tl.to(".sweep", { opacity: 0, duration: 0.3, ease: "power2.in" }, 0.85);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/mask-reveal/scene.html b/skills/music-to-video/references/motion-primitives/mask-reveal/scene.htmlnew file mode 100644index 0000000000..9970ba0b1e--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/mask-reveal/scene.html@@ -0,0 +1,74 @@+<template id="mask-reveal-template">+ <div data-composition-id="mask-reveal" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .hero {+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ color: var(--hg-fg);+ white-space: nowrap;+ }+ .mask-wrap {+ position: relative;+ overflow: hidden;+ padding: 0 60px;+ }+ .mask-clip {+ clip-path: inset(0 100% 0 0);+ will-change: clip-path;+ }+ .sweep {+ position: absolute;+ top: 0;+ bottom: 0;+ width: 8px;+ background: var(--hg-violet);+ box-shadow:+ 0 0 40px var(--hg-violet),+ 0 0 80px var(--hg-violet);+ left: 0;+ opacity: 0;+ will-change: transform, opacity;+ }+ </style>+ <div class="stage">+ <div class="mask-wrap">+ <div class="hero mask-clip">REVEAL</div>+ <div class="sweep"></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.set(".mask-clip", { clipPath: "inset(0 100% 0 0)" }, 0);+ tl.set(".sweep", { x: 0, opacity: 0 }, 0);+ tl.to(".sweep", { opacity: 1, duration: 0.08, ease: "power2.out" }, 0.1);+ tl.to(".sweep", { x: 1300, duration: 0.75, ease: "expo.out" }, 0.15);+ tl.to(".mask-clip", { clipPath: "inset(0 0% 0 0)", duration: 0.75, ease: "expo.out" }, 0.18);+ tl.to(".sweep", { opacity: 0, duration: 0.3, ease: "power2.in" }, 0.85);++ window.__timelines["mask-reveal"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/mosaic-pack/index.html b/skills/music-to-video/references/motion-primitives/mosaic-pack/index.htmlindex b33fbc358f..9385753c79 100644--- a/skills/music-to-video/references/motion-primitives/mosaic-pack/index.html+++ b/skills/music-to-video/references/motion-primitives/mosaic-pack/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,29 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .grid {- display: grid;- grid-template-columns: repeat(6, 200px);- grid-template-rows: repeat(4, 200px);- gap: 18px;- }- .tile {- border-radius: 14px;- will-change: transform, opacity;- }</style></head><body>@@ -63,62 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2.4" data-track-index="1">- <div class="stage">- <div class="grid" id="grid"></div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="mosaic-pack"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2.4"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- // Deterministic palette + grid build (6x4 = 24 cells).- const PALETTE = ["#7c3aed", "#a855f7", "#f5f5fa", "#2a2a3a", "#b56dff", "#6b6b78"];- const COLS = 6;- const ROWS = 4;- const COUNT = COLS * ROWS;- const grid = document.getElementById("grid");- const tiles = [];- for (let i = 0; i < COUNT; i++) {- const tile = document.createElement("div");- tile.className = "tile";- tile.style.background = PALETTE[i % PALETTE.length];- grid.appendChild(tile);- tiles.push(tile);- }-- // Scatter each tile from a deterministic offset/rotation, then pack into place.- // Land order ripples diagonally (col + row) for a deterministic "assembling" feel.- const STEP = 0.07;- for (let i = 0; i < COUNT; i++) {- const col = i % COLS;- const row = Math.floor(i / COLS);- const dx = (((i * 53) % 200) - 100) * 9; // far-flung scatter X- const dy = (((i * 89) % 200) - 100) * 7; // far-flung scatter Y- const rot = ((i * 37) % 80) - 40; // deterministic tilt- const order = col + row; // diagonal land sequence- tl.fromTo(- tiles[i],- { x: dx, y: dy, rotation: rot, scale: 0.6, autoAlpha: 0.15 },- {- x: 0,- y: 0,- rotation: 0,- scale: 1,- autoAlpha: 1,- duration: 0.6,- ease: "back.out(1.6)",- },- 0.1 + order * STEP,- );- }-- // Settle the packed poster with a tiny breath so the loop seats cleanly.- tl.to("#grid", { scale: 1.02, duration: 0.18, ease: "power2.out" }, 1.9);- tl.to("#grid", { scale: 1, duration: 0.32, ease: "power2.inOut" }, 2.08);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/mosaic-pack/scene.html b/skills/music-to-video/references/motion-primitives/mosaic-pack/scene.htmlnew file mode 100644index 0000000000..f208b39c45--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/mosaic-pack/scene.html@@ -0,0 +1,89 @@+<template id="mosaic-pack-template">+ <div data-composition-id="mosaic-pack" data-width="1920" data-height="1080" data-duration="2.4">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .grid {+ display: grid;+ grid-template-columns: repeat(6, 200px);+ grid-template-rows: repeat(4, 200px);+ gap: 18px;+ }+ .tile {+ border-radius: 14px;+ will-change: transform, opacity;+ }+ </style>+ <div class="stage">+ <div class="grid" id="grid"></div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Deterministic palette + grid build (6x4 = 24 cells).+ const PALETTE = ["#7c3aed", "#a855f7", "#f5f5fa", "#2a2a3a", "#b56dff", "#6b6b78"];+ const COLS = 6;+ const ROWS = 4;+ const COUNT = COLS * ROWS;+ const grid = document.getElementById("grid");+ const tiles = [];+ for (let i = 0; i < COUNT; i++) {+ const tile = document.createElement("div");+ tile.className = "tile";+ tile.style.background = PALETTE[i % PALETTE.length];+ grid.appendChild(tile);+ tiles.push(tile);+ }++ // Scatter each tile from a deterministic offset/rotation, then pack into place.+ // Land order ripples diagonally (col + row) for a deterministic "assembling" feel.+ const STEP = 0.07;+ for (let i = 0; i < COUNT; i++) {+ const col = i % COLS;+ const row = Math.floor(i / COLS);+ const dx = (((i * 53) % 200) - 100) * 9; // far-flung scatter X+ const dy = (((i * 89) % 200) - 100) * 7; // far-flung scatter Y+ const rot = ((i * 37) % 80) - 40; // deterministic tilt+ const order = col + row; // diagonal land sequence+ tl.fromTo(+ tiles[i],+ { x: dx, y: dy, rotation: rot, scale: 0.6, autoAlpha: 0.15 },+ {+ x: 0,+ y: 0,+ rotation: 0,+ scale: 1,+ autoAlpha: 1,+ duration: 0.6,+ ease: "back.out(1.6)",+ },+ 0.1 + order * STEP,+ );+ }++ // Settle the packed poster with a tiny breath so the loop seats cleanly.+ tl.to("#grid", { scale: 1.02, duration: 0.18, ease: "power2.out" }, 1.9);+ tl.to("#grid", { scale: 1, duration: 0.32, ease: "power2.inOut" }, 2.08);++ window.__timelines["mosaic-pack"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/neon-flicker/index.html b/skills/music-to-video/references/motion-primitives/neon-flicker/index.htmlindex bbda52d6fb..cad7a057fb 100644--- a/skills/music-to-video/references/motion-primitives/neon-flicker/index.html+++ b/skills/music-to-video/references/motion-primitives/neon-flicker/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,44 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .neon {- font-family: "Playfair Display", serif;- font-style: italic;- font-weight: 900;- font-size: 280px;- letter-spacing: -0.02em;- color: #ff64a0;- text-shadow:- 0 0 8px #ff64a0,- 0 0 24px #ff64a0,- 0 0 60px #ff1a7a,- 0 0 120px #ff1a7a;- will-change: opacity, text-shadow;- }- .neon-bg {- position: absolute;- inset: 0;- background: radial-gradient(- circle at 50% 50%,- rgba(255, 26, 122, 0.12) 0%,- transparent 60%- );- opacity: 0;- will-change: opacity;- }</style></head><body>@@ -78,31 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="neon-bg"></div>- <div class="stage"><div class="neon">neon</div></div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="neon-flicker"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- tl.set(".neon", { opacity: 0 }, 0);- const neonPattern = [- { t: 0.2, o: 1 },- { t: 0.26, o: 0 },- { t: 0.3, o: 1 },- { t: 0.38, o: 0.3 },- { t: 0.42, o: 1 },- { t: 0.5, o: 0.5 },- { t: 0.55, o: 1 },- ];- neonPattern.forEach((p) => {- tl.to(".neon", { opacity: p.o, duration: 0.02, ease: "steps(1)" }, p.t);- });- tl.to(".neon-bg", { opacity: 1, duration: 0.4, ease: "power2.out" }, 0.5);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/neon-flicker/scene.html b/skills/music-to-video/references/motion-primitives/neon-flicker/scene.htmlnew file mode 100644index 0000000000..580db90658--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/neon-flicker/scene.html@@ -0,0 +1,73 @@+<template id="neon-flicker-template">+ <div data-composition-id="neon-flicker" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .neon {+ font-family: "Playfair Display", serif;+ font-style: italic;+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.02em;+ color: #ff64a0;+ text-shadow:+ 0 0 8px #ff64a0,+ 0 0 24px #ff64a0,+ 0 0 60px #ff1a7a,+ 0 0 120px #ff1a7a;+ will-change: opacity, text-shadow;+ }+ .neon-bg {+ position: absolute;+ inset: 0;+ background: radial-gradient(+ circle at 50% 50%,+ rgba(255, 26, 122, 0.12) 0%,+ transparent 60%+ );+ opacity: 0;+ will-change: opacity;+ }+ </style>+ <div class="neon-bg"></div>+ <div class="stage"><div class="neon">neon</div></div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.set(".neon", { opacity: 0 }, 0);+ const neonPattern = [+ { t: 0.2, o: 1 },+ { t: 0.26, o: 0 },+ { t: 0.3, o: 1 },+ { t: 0.38, o: 0.3 },+ { t: 0.42, o: 1 },+ { t: 0.5, o: 0.5 },+ { t: 0.55, o: 1 },+ ];+ neonPattern.forEach((p) => {+ tl.to(".neon", { opacity: p.o, duration: 0.02, ease: "steps(1)" }, p.t);+ });+ tl.to(".neon-bg", { opacity: 1, duration: 0.4, ease: "power2.out" }, 0.5);++ window.__timelines["neon-flicker"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/outline-to-fill/index.html b/skills/music-to-video/references/motion-primitives/outline-to-fill/index.htmlindex ae9235bacd..51a29ab59a 100644--- a/skills/music-to-video/references/motion-primitives/outline-to-fill/index.html+++ b/skills/music-to-video/references/motion-primitives/outline-to-fill/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,48 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .outline-stack {- position: relative;- font-family: "Playfair Display", serif;- font-weight: 900;- font-size: 320px;- letter-spacing: -0.04em;- line-height: 0.95;- white-space: nowrap;- }- .stroke-layer {- position: absolute;- top: 0;- left: 0;- color: transparent;- -webkit-text-stroke: 3px var(--hg-violet-2);- text-shadow: 0 0 30px rgba(168, 85, 247, 0.5);- will-change:- opacity,- -webkit-text-stroke;- }- .fill-layer {- position: relative;- color: var(--hg-fg);- clip-path: inset(100% 0 0 0);- will-change: clip-path;- }- .spacer {- color: transparent;- }</style></head><body>@@ -82,36 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="stage">- <div class="outline-stack">- <span class="spacer">Premium</span>- <span class="stroke-layer">Premium</span>- <span class="fill-layer">Premium</span>- </div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="outline-to-fill"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- // Stroke draws in- tl.fromTo(- ".stroke-layer",- { opacity: 0, scale: 1.04 },- { opacity: 1, scale: 1, duration: 0.45, ease: "power3.out" },- 0.15,- );-- // Fill rises from bottom- tl.set(".fill-layer", { clipPath: "inset(100% 0 0 0)" }, 0);- tl.to(".fill-layer", { clipPath: "inset(0% 0 0 0)", duration: 1.0, ease: "expo.out" }, 0.55);-- // Stroke recedes once fill arrives- tl.to(".stroke-layer", { opacity: 0.35, duration: 0.6, ease: "power2.out" }, 1.0);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/outline-to-fill/scene.html b/skills/music-to-video/references/motion-primitives/outline-to-fill/scene.htmlnew file mode 100644index 0000000000..afb5335077--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/outline-to-fill/scene.html@@ -0,0 +1,82 @@+<template id="outline-to-fill-template">+ <div data-composition-id="outline-to-fill" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .outline-stack {+ position: relative;+ font-family: "Playfair Display", serif;+ font-weight: 900;+ font-size: 320px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ white-space: nowrap;+ }+ .stroke-layer {+ position: absolute;+ top: 0;+ left: 0;+ color: transparent;+ -webkit-text-stroke: 3px var(--hg-violet-2);+ text-shadow: 0 0 30px rgba(168, 85, 247, 0.5);+ will-change:+ opacity,+ -webkit-text-stroke;+ }+ .fill-layer {+ position: relative;+ color: var(--hg-fg);+ clip-path: inset(100% 0 0 0);+ will-change: clip-path;+ }+ .spacer {+ color: transparent;+ }+ </style>+ <div class="stage">+ <div class="outline-stack">+ <span class="spacer">Premium</span>+ <span class="stroke-layer">Premium</span>+ <span class="fill-layer">Premium</span>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Stroke draws in+ tl.fromTo(+ ".stroke-layer",+ { opacity: 0, scale: 1.04 },+ { opacity: 1, scale: 1, duration: 0.45, ease: "power3.out" },+ 0.15,+ );++ // Fill rises from bottom+ tl.set(".fill-layer", { clipPath: "inset(100% 0 0 0)" }, 0);+ tl.to(".fill-layer", { clipPath: "inset(0% 0 0 0)", duration: 1.0, ease: "expo.out" }, 0.55);++ // Stroke recedes once fill arrives+ tl.to(".stroke-layer", { opacity: 0.35, duration: 0.6, ease: "power2.out" }, 1.0);++ window.__timelines["outline-to-fill"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/palette-flip/index.html b/skills/music-to-video/references/motion-primitives/palette-flip/index.htmlindex 3535268dfc..d3b1c7a3bb 100644--- a/skills/music-to-video/references/motion-primitives/palette-flip/index.html+++ b/skills/music-to-video/references/motion-primitives/palette-flip/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,50 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- flex-direction: column;- align-items: center;- justify-content: center;- }- .kicker {- font-weight: 700;- font-size: 38px;- letter-spacing: 0.42em;- text-transform: uppercase;- margin-bottom: 40px;- }- .word {- font-weight: 900;- font-size: 300px;- letter-spacing: -0.05em;- line-height: 0.9;- white-space: nowrap;- }- .bars {- display: flex;- gap: 26px;- margin-top: 56px;- }- .bar {- width: 220px;- height: 26px;- border-radius: 4px;- }- .bar.b2 {- width: 140px;- }- .bar.b3 {- width: 90px;- }</style></head><body>@@ -84,49 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2.6" data-track-index="1">- <div class="stage">- <div class="kicker" id="kicker">REGIME</div>- <div class="word" id="word">REGIME</div>- <div class="bars">- <div class="bar b1"></div>- <div class="bar b2"></div>- <div class="bar b3"></div>- </div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="palette-flip"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2.6"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- // Four distinct palette regimes — same layout, re-skinned on each flip.- const regimes = [- { bg: "#0a0a0f", fg: "#f5f5fa", accent: "#7c3aed", kicker: "#a855f7" }, // dark / violet- { bg: "#f4ead8", fg: "#1a1410", accent: "#ff5a47", kicker: "#c4452f" }, // cream / coral- { bg: "#08222b", fg: "#eafaf6", accent: "#1fd1b0", kicker: "#7fe3d2" }, // navy / teal- { bg: "#000000", fg: "#ffce3a", accent: "#ffce3a", kicker: "#7a6010" }, // black / amber- ];-- const beat = 0.6;- const scene = "#scene";- const word = "#word";- const kicker = "#kicker";- const bars = ".bar";-- // Instant 0ms flips on every beat — cycle through the regimes deterministically.- // The motion IS the colour change; layout never moves.- const flips = 5;- for (let i = 0; i < flips; i++) {- const p = regimes[i % regimes.length];- const t = i * beat;- tl.set(scene, { backgroundColor: p.bg }, t);- tl.set(word, { color: p.fg }, t);- tl.set(kicker, { color: p.kicker }, t);- tl.set(bars, { backgroundColor: p.accent }, t);- }-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/palette-flip/scene.html b/skills/music-to-video/references/motion-primitives/palette-flip/scene.htmlnew file mode 100644index 0000000000..68206f860b--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/palette-flip/scene.html@@ -0,0 +1,97 @@+<template id="palette-flip-template">+ <div data-composition-id="palette-flip" data-width="1920" data-height="1080" data-duration="2.6">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ flex-direction: column;+ align-items: center;+ justify-content: center;+ }+ .kicker {+ font-weight: 700;+ font-size: 38px;+ letter-spacing: 0.42em;+ text-transform: uppercase;+ margin-bottom: 40px;+ }+ .word {+ font-weight: 900;+ font-size: 300px;+ letter-spacing: -0.05em;+ line-height: 0.9;+ white-space: nowrap;+ }+ .bars {+ display: flex;+ gap: 26px;+ margin-top: 56px;+ }+ .bar {+ width: 220px;+ height: 26px;+ border-radius: 4px;+ }+ .bar.b2 {+ width: 140px;+ }+ .bar.b3 {+ width: 90px;+ }+ </style>+ <div class="stage">+ <div class="kicker" id="kicker">REGIME</div>+ <div class="word" id="word">REGIME</div>+ <div class="bars">+ <div class="bar b1"></div>+ <div class="bar b2"></div>+ <div class="bar b3"></div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Four distinct palette regimes — same layout, re-skinned on each flip.+ const regimes = [+ { bg: "#0a0a0f", fg: "#f5f5fa", accent: "#7c3aed", kicker: "#a855f7" }, // dark / violet+ { bg: "#f4ead8", fg: "#1a1410", accent: "#ff5a47", kicker: "#c4452f" }, // cream / coral+ { bg: "#08222b", fg: "#eafaf6", accent: "#1fd1b0", kicker: "#7fe3d2" }, // navy / teal+ { bg: "#000000", fg: "#ffce3a", accent: "#ffce3a", kicker: "#7a6010" }, // black / amber+ ];++ const beat = 0.6;+ const scene = "#scene";+ const word = "#word";+ const kicker = "#kicker";+ const bars = ".bar";++ // Instant 0ms flips on every beat — cycle through the regimes deterministically.+ // The motion IS the colour change; layout never moves.+ const flips = 5;+ for (let i = 0; i < flips; i++) {+ const p = regimes[i % regimes.length];+ const t = i * beat;+ tl.set(scene, { backgroundColor: p.bg }, t);+ tl.set(word, { color: p.fg }, t);+ tl.set(kicker, { color: p.kicker }, t);+ tl.set(bars, { backgroundColor: p.accent }, t);+ }++ window.__timelines["palette-flip"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/particle-burst/index.html b/skills/music-to-video/references/motion-primitives/particle-burst/index.htmlindex d80800afa5..0a1d650a6c 100644--- a/skills/music-to-video/references/motion-primitives/particle-burst/index.html+++ b/skills/music-to-video/references/motion-primitives/particle-burst/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,47 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .hero {- font-weight: 900;- font-size: 320px;- letter-spacing: -0.05em;- color: var(--hg-fg);- white-space: nowrap;- will-change: transform, opacity;- position: relative;- z-index: 10;- }- .particle-stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- pointer-events: none;- }- .particle {- position: absolute;- width: 8px;- height: 8px;- border-radius: 50%;- background: var(--hg-violet-2);- box-shadow: 0 0 12px var(--hg-violet-2);- opacity: 0;- will-change: transform, opacity;- }</style></head><body>@@ -81,61 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="particle-stage" id="particles"></div>- <div class="stage"><div class="hero">SPARK</div></div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="particle-burst"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- // Build N particles deterministically- const N = 36;- const container = document.getElementById("particles");- const particles = [];- for (let i = 0; i < N; i++) {- const p = document.createElement("div");- p.className = "particle";- // Vary size per particle for visual interest- const sz = 4 + (i % 4) * 3;- p.style.width = sz + "px";- p.style.height = sz + "px";- // Slight color variation- const hue = ((i * 17) % 60) - 30;- p.style.filter = `hue-rotate(${hue}deg)`;- container.appendChild(p);- particles.push(p);- }-- // Hero punch + flash entry- tl.fromTo(- ".hero",- { scale: 0.85, opacity: 0 },- { scale: 1, opacity: 1, duration: 0.3, ease: "power4.out" },- 0.3,- );-- // Particles burst out- particles.forEach((p, i) => {- const angle = (i / N) * Math.PI * 2 + i * 0.137; // golden-angle jitter- const radius = 500 + (i % 5) * 90 + (i % 3) * 40;- const tx = Math.cos(angle) * radius;- const ty = Math.sin(angle) * radius;- const dur = 1.1 + (i % 5) * 0.08;- tl.fromTo(- p,- { x: 0, y: 0, scale: 1, opacity: 1 },- { x: tx, y: ty, scale: 0, opacity: 0, duration: dur, ease: "expo.out" },- 0.35 + (i % 6) * 0.012,- );- });-- // Hero settle wobble- tl.to(".hero", { scale: 1.04, duration: 0.1, ease: "power3.out" }, 0.35);- tl.to(".hero", { scale: 1.0, duration: 0.5, ease: "elastic.out(1, 0.5)" }, 0.45);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/particle-burst/scene.html b/skills/music-to-video/references/motion-primitives/particle-burst/scene.htmlnew file mode 100644index 0000000000..ae0721122d--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/particle-burst/scene.html@@ -0,0 +1,106 @@+<template id="particle-burst-template">+ <div data-composition-id="particle-burst" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .hero {+ font-weight: 900;+ font-size: 320px;+ letter-spacing: -0.05em;+ color: var(--hg-fg);+ white-space: nowrap;+ will-change: transform, opacity;+ position: relative;+ z-index: 10;+ }+ .particle-stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ pointer-events: none;+ }+ .particle {+ position: absolute;+ width: 8px;+ height: 8px;+ border-radius: 50%;+ background: var(--hg-violet-2);+ box-shadow: 0 0 12px var(--hg-violet-2);+ opacity: 0;+ will-change: transform, opacity;+ }+ </style>+ <div class="particle-stage" id="particles"></div>+ <div class="stage"><div class="hero">SPARK</div></div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Build N particles deterministically+ const N = 36;+ const container = document.getElementById("particles");+ const particles = [];+ for (let i = 0; i < N; i++) {+ const p = document.createElement("div");+ p.className = "particle";+ // Vary size per particle for visual interest+ const sz = 4 + (i % 4) * 3;+ p.style.width = sz + "px";+ p.style.height = sz + "px";+ // Slight color variation+ const hue = ((i * 17) % 60) - 30;+ p.style.filter = `hue-rotate(${hue}deg)`;+ container.appendChild(p);+ particles.push(p);+ }++ // Hero punch + flash entry+ tl.fromTo(+ ".hero",+ { scale: 0.85, opacity: 0 },+ { scale: 1, opacity: 1, duration: 0.3, ease: "power4.out" },+ 0.3,+ );++ // Particles burst out+ particles.forEach((p, i) => {+ const angle = (i / N) * Math.PI * 2 + i * 0.137; // golden-angle jitter+ const radius = 500 + (i % 5) * 90 + (i % 3) * 40;+ const tx = Math.cos(angle) * radius;+ const ty = Math.sin(angle) * radius;+ const dur = 1.1 + (i % 5) * 0.08;+ tl.fromTo(+ p,+ { x: 0, y: 0, scale: 1, opacity: 1 },+ { x: tx, y: ty, scale: 0, opacity: 0, duration: dur, ease: "expo.out" },+ 0.35 + (i % 6) * 0.012,+ );+ });++ // Hero settle wobble+ tl.to(".hero", { scale: 1.04, duration: 0.1, ease: "power3.out" }, 0.35);+ tl.to(".hero", { scale: 1.0, duration: 0.5, ease: "elastic.out(1, 0.5)" }, 0.45);++ window.__timelines["particle-burst"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/pixel-dissolve/index.html b/skills/music-to-video/references/motion-primitives/pixel-dissolve/index.htmlindex 913983517d..7505d878a2 100644--- a/skills/music-to-video/references/motion-primitives/pixel-dissolve/index.html+++ b/skills/music-to-video/references/motion-primitives/pixel-dissolve/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,42 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .hero {- font-weight: 900;- font-size: 320px;- letter-spacing: -0.05em;- color: var(--hg-fg);- white-space: nowrap;- background: linear-gradient(135deg, #7c3aed 0%, #a855f7 60%, #d946ef 100%);- -webkit-background-clip: text;- background-clip: text;- -webkit-text-fill-color: transparent;- color: transparent;- }- .grid {- position: absolute;- inset: 0;- display: grid;- will-change: contents;- pointer-events: none;- }- .cell {- background: var(--hg-bg);- will-change: opacity, transform;- }</style></head><body>@@ -76,46 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="stage"><div class="hero">DISSOLVE</div></div>- <div class="grid" id="grid"></div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="pixel-dissolve"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- const COLS = 24;- const ROWS = 14;- const grid = document.getElementById("grid");- grid.style.gridTemplateColumns = `repeat(${COLS}, 1fr)`;- grid.style.gridTemplateRows = `repeat(${ROWS}, 1fr)`;-- const cells = [];- for (let i = 0; i < COLS * ROWS; i++) {- const c = document.createElement("div");- c.className = "cell";- grid.appendChild(c);- cells.push(c);- }-- // Deterministic shuffle: hash function based on i+j- function hash(i) {- return ((i * 9301 + 49297) % 233280) / 233280;- }- const order = cells.map((c, i) => ({ c, i, h: hash(i) })).sort((a, b) => a.h - b.h);-- // All cells start visible (covering hero), fade out in shuffled order- const TOTAL = 0.85;- order.forEach((o, k) => {- const t = 0.35 + (k / order.length) * TOTAL;- tl.to(o.c, { opacity: 0, duration: 0.06, ease: "steps(1)" }, t);- });-- // After dissolve, gentle hero scale settle (it was always visible, now exposed)- tl.fromTo(".hero", { scale: 1.03 }, { scale: 1.0, duration: 0.5, ease: "power2.out" }, 1.0);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/pixel-dissolve/scene.html b/skills/music-to-video/references/motion-primitives/pixel-dissolve/scene.htmlnew file mode 100644index 0000000000..ff002ca41f--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/pixel-dissolve/scene.html@@ -0,0 +1,86 @@+<template id="pixel-dissolve-template">+ <div data-composition-id="pixel-dissolve" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .hero {+ font-weight: 900;+ font-size: 320px;+ letter-spacing: -0.05em;+ color: var(--hg-fg);+ white-space: nowrap;+ background: linear-gradient(135deg, #7c3aed 0%, #a855f7 60%, #d946ef 100%);+ -webkit-background-clip: text;+ background-clip: text;+ -webkit-text-fill-color: transparent;+ color: transparent;+ }+ .grid {+ position: absolute;+ inset: 0;+ display: grid;+ will-change: contents;+ pointer-events: none;+ }+ .cell {+ background: var(--hg-bg);+ will-change: opacity, transform;+ }+ </style>+ <div class="stage"><div class="hero">DISSOLVE</div></div>+ <div class="grid" id="grid"></div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ const COLS = 24;+ const ROWS = 14;+ const grid = document.getElementById("grid");+ grid.style.gridTemplateColumns = `repeat(${COLS}, 1fr)`;+ grid.style.gridTemplateRows = `repeat(${ROWS}, 1fr)`;++ const cells = [];+ for (let i = 0; i < COLS * ROWS; i++) {+ const c = document.createElement("div");+ c.className = "cell";+ grid.appendChild(c);+ cells.push(c);+ }++ // Deterministic shuffle: hash function based on i+j+ function hash(i) {+ return ((i * 9301 + 49297) % 233280) / 233280;+ }+ const order = cells.map((c, i) => ({ c, i, h: hash(i) })).sort((a, b) => a.h - b.h);++ // All cells start visible (covering hero), fade out in shuffled order+ const TOTAL = 0.85;+ order.forEach((o, k) => {+ const t = 0.35 + (k / order.length) * TOTAL;+ tl.to(o.c, { opacity: 0, duration: 0.06, ease: "steps(1)" }, t);+ });++ // After dissolve, gentle hero scale settle (it was always visible, now exposed)+ tl.fromTo(".hero", { scale: 1.03 }, { scale: 1.0, duration: 0.5, ease: "power2.out" }, 1.0);++ window.__timelines["pixel-dissolve"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/radial-burst-lines/index.html b/skills/music-to-video/references/motion-primitives/radial-burst-lines/index.htmlindex d04dc2bb82..b50aa25943 100644--- a/skills/music-to-video/references/motion-primitives/radial-burst-lines/index.html+++ b/skills/music-to-video/references/motion-primitives/radial-burst-lines/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,46 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .hero {- font-weight: 900;- font-size: 320px;- letter-spacing: -0.05em;- color: var(--hg-fg);- white-space: nowrap;- position: relative;- z-index: 10;- will-change: transform;- }- .burst-stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- pointer-events: none;- }- .line {- position: absolute;- width: 5px;- height: 180px;- background: linear-gradient(to top, transparent 0%, var(--hg-fg) 50%, transparent 100%);- transform-origin: bottom center;- opacity: 0;- will-change: transform, opacity;- }</style></head><body>@@ -80,81 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="burst-stage" id="bursts"></div>- <div class="stage"><div class="hero">BAM</div></div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="radial-burst-lines"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- // Build 20 lines- const N = 20;- const container = document.getElementById("bursts");- const lines = [];- for (let i = 0; i < N; i++) {- const l = document.createElement("div");- l.className = "line";- const angle = (i / N) * 360;- const innerRadius = 220;- // Rotate around center, push outward via transform-origin trick.- // Easier: use translate then rotate- l.style.transform = `rotate(${angle}deg) translateY(-${innerRadius}px) scaleY(0)`;- container.appendChild(l);- lines.push({ el: l, angle });- }-- // Hero punch- tl.fromTo(- ".hero",- { scale: 0.7, opacity: 0 },- { scale: 1.1, opacity: 1, duration: 0.15, ease: "power4.out" },- 0.3,- );- tl.to(".hero", { scale: 1.0, duration: 0.4, ease: "elastic.out(1, 0.5)" }, 0.45);-- // Burst lines expand- lines.forEach((l, i) => {- const innerRadius = 220 + (i % 3) * 30; // vary radius- const len = 200 + (i % 4) * 40; // vary length- const ang = l.angle;- tl.set(- l.el,- {- rotation: ang,- x: 0,- y: 0,- scaleY: 0,- opacity: 0,- transformOrigin: "center bottom",- },- 0,- );- // GSAP transforms compose, so we set the rotation + translate via separate properties- // Use a custom transform string approach- tl.to(- l.el,- {- scaleY: 1,- opacity: 1,- duration: 0.18,- ease: "power4.out",- onUpdate: function () {- const p = this.progress();- const t = -innerRadius - len * p * 0.2;- l.el.style.transform = `rotate(${ang}deg) translateY(${t}px) scaleY(${p})`;- l.el.style.opacity = (p > 0.7 ? 1 - (p - 0.7) / 0.3 : 1).toString();- },- },- 0.32 + (i % 5) * 0.018,- );- });-- // Hold then fade- tl.to(".line", { opacity: 0, duration: 0.4, ease: "power2.out" }, 0.9);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/radial-burst-lines/scene.html b/skills/music-to-video/references/motion-primitives/radial-burst-lines/scene.htmlnew file mode 100644index 0000000000..73f92d5986--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/radial-burst-lines/scene.html@@ -0,0 +1,130 @@+<template id="radial-burst-lines-template">+ <div+ data-composition-id="radial-burst-lines"+ data-width="1920"+ data-height="1080"+ data-duration="2"+ >+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .hero {+ font-weight: 900;+ font-size: 320px;+ letter-spacing: -0.05em;+ color: var(--hg-fg);+ white-space: nowrap;+ position: relative;+ z-index: 10;+ will-change: transform;+ }+ .burst-stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ pointer-events: none;+ }+ .line {+ position: absolute;+ width: 5px;+ height: 180px;+ background: linear-gradient(to top, transparent 0%, var(--hg-fg) 50%, transparent 100%);+ transform-origin: bottom center;+ opacity: 0;+ will-change: transform, opacity;+ }+ </style>+ <div class="burst-stage" id="bursts"></div>+ <div class="stage"><div class="hero">BAM</div></div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Build 20 lines+ const N = 20;+ const container = document.getElementById("bursts");+ const lines = [];+ for (let i = 0; i < N; i++) {+ const l = document.createElement("div");+ l.className = "line";+ const angle = (i / N) * 360;+ const innerRadius = 220;+ // Rotate around center, push outward via transform-origin trick.+ // Easier: use translate then rotate+ l.style.transform = `rotate(${angle}deg) translateY(-${innerRadius}px) scaleY(0)`;+ container.appendChild(l);+ lines.push({ el: l, angle });+ }++ // Hero punch+ tl.fromTo(+ ".hero",+ { scale: 0.7, opacity: 0 },+ { scale: 1.1, opacity: 1, duration: 0.15, ease: "power4.out" },+ 0.3,+ );+ tl.to(".hero", { scale: 1.0, duration: 0.4, ease: "elastic.out(1, 0.5)" }, 0.45);++ // Burst lines expand+ lines.forEach((l, i) => {+ const innerRadius = 220 + (i % 3) * 30; // vary radius+ const len = 200 + (i % 4) * 40; // vary length+ const ang = l.angle;+ tl.set(+ l.el,+ {+ rotation: ang,+ x: 0,+ y: 0,+ scaleY: 0,+ opacity: 0,+ transformOrigin: "center bottom",+ },+ 0,+ );+ // GSAP transforms compose, so we set the rotation + translate via separate properties+ // Use a custom transform string approach+ tl.to(+ l.el,+ {+ scaleY: 1,+ opacity: 1,+ duration: 0.18,+ ease: "power4.out",+ onUpdate: function () {+ const p = this.progress();+ const t = -innerRadius - len * p * 0.2;+ l.el.style.transform = `rotate(${ang}deg) translateY(${t}px) scaleY(${p})`;+ l.el.style.opacity = (p > 0.7 ? 1 - (p - 0.7) / 0.3 : 1).toString();+ },+ },+ 0.32 + (i % 5) * 0.018,+ );+ });++ // Hold then fade+ tl.to(".line", { opacity: 0, duration: 0.4, ease: "power2.out" }, 0.9);++ window.__timelines["radial-burst-lines"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/screen-shake/index.html b/skills/music-to-video/references/motion-primitives/screen-shake/index.htmlindex 7047a67a90..659d3cb192 100644--- a/skills/music-to-video/references/motion-primitives/screen-shake/index.html+++ b/skills/music-to-video/references/motion-primitives/screen-shake/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,35 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .hero {- font-weight: 900;- font-size: 280px;- letter-spacing: -0.04em;- line-height: 0.95;- color: var(--hg-fg);- white-space: nowrap;- }- .shake-stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- will-change: transform;- }- .impact-bg {- position: absolute;- inset: 0;- background: radial-gradient(circle at 50% 50%, rgba(255, 42, 74, 0.18) 0%, transparent 60%);- opacity: 0;- will-change: opacity;- }</style></head><body>@@ -69,45 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="impact-bg"></div>- <div class="shake-stage"><div class="hero">IMPACT</div></div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="screen-shake"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- tl.fromTo(- ".hero",- { scale: 0.6, opacity: 0 },- { scale: 1, opacity: 1, duration: 0.15, ease: "power4.out" },- 0.3,- );- tl.fromTo(- ".impact-bg",- { opacity: 0 },- { opacity: 1, duration: 0.06, ease: "steps(1)" },- 0.3,- );- tl.to(".impact-bg", { opacity: 0, duration: 0.6, ease: "power2.in" }, 0.4);-- const shakeStart = 0.32;- const shakeAmps = [28, -24, 20, -22, 16, -18, 14, -14, 10, -8, 6, -5, 3, -2];- shakeAmps.forEach((amp, i) => {- tl.to(- ".shake-stage",- { x: amp, y: amp * 0.7 * (i % 2 ? -1 : 1), duration: 0.03, ease: "steps(1)" },- shakeStart + i * 0.03,- );- });- tl.to(- ".shake-stage",- { x: 0, y: 0, duration: 0.1, ease: "power2.out" },- shakeStart + shakeAmps.length * 0.03,- );-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/screen-shake/scene.html b/skills/music-to-video/references/motion-primitives/screen-shake/scene.htmlnew file mode 100644index 0000000000..79d4ae3557--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/screen-shake/scene.html@@ -0,0 +1,78 @@+<template id="screen-shake-template">+ <div data-composition-id="screen-shake" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .hero {+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.04em;+ line-height: 0.95;+ color: var(--hg-fg);+ white-space: nowrap;+ }+ .shake-stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ will-change: transform;+ }+ .impact-bg {+ position: absolute;+ inset: 0;+ background: radial-gradient(circle at 50% 50%, rgba(255, 42, 74, 0.18) 0%, transparent 60%);+ opacity: 0;+ will-change: opacity;+ }+ </style>+ <div class="impact-bg"></div>+ <div class="shake-stage"><div class="hero">IMPACT</div></div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ tl.fromTo(+ ".hero",+ { scale: 0.6, opacity: 0 },+ { scale: 1, opacity: 1, duration: 0.15, ease: "power4.out" },+ 0.3,+ );+ tl.fromTo(+ ".impact-bg",+ { opacity: 0 },+ { opacity: 1, duration: 0.06, ease: "steps(1)" },+ 0.3,+ );+ tl.to(".impact-bg", { opacity: 0, duration: 0.6, ease: "power2.in" }, 0.4);++ const shakeStart = 0.32;+ const shakeAmps = [28, -24, 20, -22, 16, -18, 14, -14, 10, -8, 6, -5, 3, -2];+ shakeAmps.forEach((amp, i) => {+ tl.to(+ ".shake-stage",+ { x: amp, y: amp * 0.7 * (i % 2 ? -1 : 1), duration: 0.03, ease: "steps(1)" },+ shakeStart + i * 0.03,+ );+ });+ tl.to(+ ".shake-stage",+ { x: 0, y: 0, duration: 0.1, ease: "power2.out" },+ shakeStart + shakeAmps.length * 0.03,+ );++ window.__timelines["screen-shake"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/slot-machine-reveal/index.html b/skills/music-to-video/references/motion-primitives/slot-machine-reveal/index.htmlindex 14e9d76f18..59c170160d 100644--- a/skills/music-to-video/references/motion-primitives/slot-machine-reveal/index.html+++ b/skills/music-to-video/references/motion-primitives/slot-machine-reveal/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,45 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .slot {- font-family: "JetBrains Mono", monospace;- font-weight: 700;- font-size: 280px;- letter-spacing: 0.04em;- color: var(--hg-fg);- display: flex;- gap: 30px;- }- .slot .digit {- display: inline-block;- min-width: 1ch;- text-shadow: 0 0 40px rgba(168, 85, 247, 0.6);- }- .slot-label {- position: absolute;- bottom: 30%;- left: 50%;- transform: translateX(-50%);- font-family: "JetBrains Mono", monospace;- font-size: 22px;- color: var(--hg-dim);- letter-spacing: 0.4em;- text-transform: uppercase;- opacity: 0;- }</style></head><body>@@ -79,52 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="stage">- <div class="slot">- <span class="digit" data-target="5">0</span>- <span class="digit" data-target=".">0</span>- <span class="digit" data-target="5">0</span>- <span class="digit" data-target="x">0</span>- </div>- </div>- <div class="slot-label">FINAL VERSION</div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="slot-machine-reveal"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- const DIGITS = "0123456789";- const slotStates = [{ p: 0 }, { p: 0 }, { p: 0 }, { p: 0 }];- slotStates.forEach((state, idx) => {- tl.to(- state,- {- p: 1,- duration: 1.0,- delay: idx * 0.08,- ease: "power3.out",- onUpdate: function () {- const spans = document.querySelectorAll(".slot .digit");- const span = spans[idx];- if (!span) return;- const target = span.getAttribute("data-target");- if (state.p >= 0.85) {- span.textContent = target;- span.style.color = "var(--hg-violet-2)";- } else {- const tick = Math.floor(state.p * 80 + idx * 3);- span.textContent = DIGITS.charAt(tick % 10);- }- },- },- 0.15,- );- });- tl.to(".slot-label", { opacity: 1, duration: 0.5, ease: "power2.out" }, 1.2);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/slot-machine-reveal/scene.html b/skills/music-to-video/references/motion-primitives/slot-machine-reveal/scene.htmlnew file mode 100644index 0000000000..d9ed267bcf--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/slot-machine-reveal/scene.html@@ -0,0 +1,100 @@+<template id="slot-machine-reveal-template">+ <div+ data-composition-id="slot-machine-reveal"+ data-width="1920"+ data-height="1080"+ data-duration="2"+ >+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .slot {+ font-family: "JetBrains Mono", monospace;+ font-weight: 700;+ font-size: 280px;+ letter-spacing: 0.04em;+ color: var(--hg-fg);+ display: flex;+ gap: 30px;+ }+ .slot .digit {+ display: inline-block;+ min-width: 1ch;+ text-shadow: 0 0 40px rgba(168, 85, 247, 0.6);+ }+ .slot-label {+ position: absolute;+ bottom: 30%;+ left: 50%;+ transform: translateX(-50%);+ font-family: "JetBrains Mono", monospace;+ font-size: 22px;+ color: var(--hg-dim);+ letter-spacing: 0.4em;+ text-transform: uppercase;+ opacity: 0;+ }+ </style>+ <div class="stage">+ <div class="slot">+ <span class="digit" data-target="5">0</span>+ <span class="digit" data-target=".">0</span>+ <span class="digit" data-target="5">0</span>+ <span class="digit" data-target="x">0</span>+ </div>+ </div>+ <div class="slot-label">FINAL VERSION</div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ const DIGITS = "0123456789";+ const slotStates = [{ p: 0 }, { p: 0 }, { p: 0 }, { p: 0 }];+ slotStates.forEach((state, idx) => {+ tl.to(+ state,+ {+ p: 1,+ duration: 1.0,+ delay: idx * 0.08,+ ease: "power3.out",+ onUpdate: function () {+ const spans = document.querySelectorAll(".slot .digit");+ const span = spans[idx];+ if (!span) return;+ const target = span.getAttribute("data-target");+ if (state.p >= 0.85) {+ span.textContent = target;+ span.style.color = "var(--hg-violet-2)";+ } else {+ const tick = Math.floor(state.p * 80 + idx * 3);+ span.textContent = DIGITS.charAt(tick % 10);+ }+ },+ },+ 0.15,+ );+ });+ tl.to(".slot-label", { opacity: 1, duration: 0.5, ease: "power2.out" }, 1.2);++ window.__timelines["slot-machine-reveal"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/spotlight-sweep/index.html b/skills/music-to-video/references/motion-primitives/spotlight-sweep/index.htmlindex f1e34acf90..2a5a53402f 100644--- a/skills/music-to-video/references/motion-primitives/spotlight-sweep/index.html+++ b/skills/music-to-video/references/motion-primitives/spotlight-sweep/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,63 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .dim-layer {- position: absolute;- inset: 0;- background: #03030a;- }- .hero-bright,- .hero-dim {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- font-family: "Playfair Display", serif;- font-weight: 900;- font-size: 320px;- letter-spacing: -0.04em;- white-space: nowrap;- }- .hero-dim {- color: rgba(245, 245, 250, 0.06);- }- .hero-bright {- color: var(--hg-fg);- text-shadow:- 0 0 30px rgba(168, 85, 247, 0.4),- 0 0 80px rgba(168, 85, 247, 0.2);- -webkit-mask-image: radial-gradient(- circle 360px at -400px 50%,- #000 0%,- rgba(0, 0, 0, 0.6) 60%,- transparent 80%- );- mask-image: radial-gradient(- circle 360px at -400px 50%,- #000 0%,- rgba(0, 0, 0, 0.6) 60%,- transparent 80%- );- will-change: mask-image;- }- .spotlight-glow {- position: absolute;- inset: 0;- background: radial-gradient(- circle 380px at -400px 50%,- rgba(168, 85, 247, 0.18) 0%,- transparent 60%- );- will-change: background;- mix-blend-mode: screen;- }</style></head><body>@@ -97,41 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="dim-layer"></div>- <div class="hero-dim">DISCOVER</div>- <div class="hero-bright" id="bright">DISCOVER</div>- <div class="spotlight-glow" id="glow"></div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="spotlight-sweep"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- // Animate the spotlight x position via mask-image (use a proxy + onUpdate for smoothness)- const state = { x: -400 };- tl.to(- state,- {- x: 2300,- duration: 1.4,- ease: "power2.inOut",- onUpdate: function () {- const m = `radial-gradient(circle 360px at ${state.x}px 50%, #000 0%, rgba(0,0,0,0.6) 60%, transparent 80%)`;- const g = `radial-gradient(circle 380px at ${state.x}px 50%, rgba(168, 85, 247, 0.18) 0%, transparent 60%)`;- const bright = document.getElementById("bright");- const glow = document.getElementById("glow");- if (bright) {- bright.style.maskImage = m;- bright.style.webkitMaskImage = m;- }- if (glow) glow.style.background = g;- },- },- 0.3,- );-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/spotlight-sweep/scene.html b/skills/music-to-video/references/motion-primitives/spotlight-sweep/scene.htmlnew file mode 100644index 0000000000..de407b4161--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/spotlight-sweep/scene.html@@ -0,0 +1,102 @@+<template id="spotlight-sweep-template">+ <div data-composition-id="spotlight-sweep" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .dim-layer {+ position: absolute;+ inset: 0;+ background: #03030a;+ }+ .hero-bright,+ .hero-dim {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ font-family: "Playfair Display", serif;+ font-weight: 900;+ font-size: 320px;+ letter-spacing: -0.04em;+ white-space: nowrap;+ }+ .hero-dim {+ color: rgba(245, 245, 250, 0.06);+ }+ .hero-bright {+ color: var(--hg-fg);+ text-shadow:+ 0 0 30px rgba(168, 85, 247, 0.4),+ 0 0 80px rgba(168, 85, 247, 0.2);+ -webkit-mask-image: radial-gradient(+ circle 360px at -400px 50%,+ #000 0%,+ rgba(0, 0, 0, 0.6) 60%,+ transparent 80%+ );+ mask-image: radial-gradient(+ circle 360px at -400px 50%,+ #000 0%,+ rgba(0, 0, 0, 0.6) 60%,+ transparent 80%+ );+ will-change: mask-image;+ }+ .spotlight-glow {+ position: absolute;+ inset: 0;+ background: radial-gradient(+ circle 380px at -400px 50%,+ rgba(168, 85, 247, 0.18) 0%,+ transparent 60%+ );+ will-change: background;+ mix-blend-mode: screen;+ }+ </style>+ <div class="dim-layer"></div>+ <div class="hero-dim">DISCOVER</div>+ <div class="hero-bright" id="bright">DISCOVER</div>+ <div class="spotlight-glow" id="glow"></div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Animate the spotlight x position via mask-image (use a proxy + onUpdate for smoothness)+ const state = { x: -400 };+ tl.to(+ state,+ {+ x: 2300,+ duration: 1.4,+ ease: "power2.inOut",+ onUpdate: function () {+ const m = `radial-gradient(circle 360px at ${state.x}px 50%, #000 0%, rgba(0,0,0,0.6) 60%, transparent 80%)`;+ const g = `radial-gradient(circle 380px at ${state.x}px 50%, rgba(168, 85, 247, 0.18) 0%, transparent 60%)`;+ const bright = document.getElementById("bright");+ const glow = document.getElementById("glow");+ if (bright) {+ bright.style.maskImage = m;+ bright.style.webkitMaskImage = m;+ }+ if (glow) glow.style.background = g;+ },+ },+ 0.3,+ );++ window.__timelines["spotlight-sweep"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/staggered-exit/index.html b/skills/music-to-video/references/motion-primitives/staggered-exit/index.htmlindex cd8db889f8..a02c70434a 100644--- a/skills/music-to-video/references/motion-primitives/staggered-exit/index.html+++ b/skills/music-to-video/references/motion-primitives/staggered-exit/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,38 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .grid {- display: grid;- grid-template-columns: repeat(4, 320px);- grid-template-rows: repeat(2, 320px);- gap: 36px;- }- .card {- display: flex;- align-items: center;- justify-content: center;- border-radius: 28px;- background: linear-gradient(135deg, var(--hg-violet), var(--hg-violet-2));- color: var(--hg-fg);- font-weight: 900;- font-size: 72px;- letter-spacing: -0.02em;- box-shadow: 0 24px 60px rgba(124, 58, 237, 0.35);- will-change: transform, opacity;- }</style></head><body>@@ -72,46 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="stage">- <div class="grid">- <div class="card">NORTH</div>- <div class="card">EAST</div>- <div class="card">SOUTH</div>- <div class="card">WEST</div>- <div class="card">PEAK</div>- <div class="card">EDGE</div>- <div class="card">CORE</div>- <div class="card">FLUX</div>- </div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="staggered-exit"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- const cards = gsap.utils.toArray(".card");- const hold = 0.4; // fully visible hold before the cascade begins- const step = 0.11; // per-element offset- const exitDur = 0.45;-- // start fully visible- tl.set(cards, { autoAlpha: 1, y: 0 }, 0);-- // ordered exit: each card slides down + fades, one after another- for (let i = 0; i < cards.length; i++) {- tl.to(- cards[i],- { y: 80, autoAlpha: 0, duration: exitDur, ease: "power3.in" },- hold + i * step,- );- }-- // snap all back to the visible start state so the next loop begins full- tl.set(cards, { autoAlpha: 1, y: 0 }, 1.95);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/staggered-exit/scene.html b/skills/music-to-video/references/motion-primitives/staggered-exit/scene.htmlnew file mode 100644index 0000000000..8e2f8acfe7--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/staggered-exit/scene.html@@ -0,0 +1,82 @@+<template id="staggered-exit-template">+ <div data-composition-id="staggered-exit" data-width="1920" data-height="1080" data-duration="2">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .grid {+ display: grid;+ grid-template-columns: repeat(4, 320px);+ grid-template-rows: repeat(2, 320px);+ gap: 36px;+ }+ .card {+ display: flex;+ align-items: center;+ justify-content: center;+ border-radius: 28px;+ background: linear-gradient(135deg, var(--hg-violet), var(--hg-violet-2));+ color: var(--hg-fg);+ font-weight: 900;+ font-size: 72px;+ letter-spacing: -0.02em;+ box-shadow: 0 24px 60px rgba(124, 58, 237, 0.35);+ will-change: transform, opacity;+ }+ </style>+ <div class="stage">+ <div class="grid">+ <div class="card">NORTH</div>+ <div class="card">EAST</div>+ <div class="card">SOUTH</div>+ <div class="card">WEST</div>+ <div class="card">PEAK</div>+ <div class="card">EDGE</div>+ <div class="card">CORE</div>+ <div class="card">FLUX</div>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ const cards = gsap.utils.toArray(".card");+ const hold = 0.4; // fully visible hold before the cascade begins+ const step = 0.11; // per-element offset+ const exitDur = 0.45;++ // start fully visible+ tl.set(cards, { autoAlpha: 1, y: 0 }, 0);++ // ordered exit: each card slides down + fades, one after another+ for (let i = 0; i < cards.length; i++) {+ tl.to(+ cards[i],+ { y: 80, autoAlpha: 0, duration: exitDur, ease: "power3.in" },+ hold + i * step,+ );+ }++ // snap all back to the visible start state so the next loop begins full+ tl.set(cards, { autoAlpha: 1, y: 0 }, 1.95);++ window.__timelines["staggered-exit"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/text-spectral-rays/index.html b/skills/music-to-video/references/motion-primitives/text-spectral-rays/index.htmlindex ed3292d6e4..1aabbe7912 100644--- a/skills/music-to-video/references/motion-primitives/text-spectral-rays/index.html+++ b/skills/music-to-video/references/motion-primitives/text-spectral-rays/index.html@@ -1,13 +1,5 @@<!doctype html>-<html- lang="en"- data-composition-variables='[- {"id":"text", "type":"string", "label":"Wordmark", "default":"SPECTRAL"},- {"id":"textColor", "type":"color", "label":"Wordmark fill", "default":"#f6ff7a"},- {"id":"bgColor", "type":"color", "label":"Stage background", "default":"#000000"},- {"id":"sweepSpeed", "type":"number", "label":"Light sweep speed", "default":1, "min":0.2, "max":3, "step":0.1}- ]'->+<html lang="en"><head><meta charset="UTF-8" /><meta name="viewport" content="width=1920, height=1080" />@@ -21,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -37,32 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- background: #000;- }- .vfx-canvas {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- display: block;- }- .label {- position: absolute;- left: 48px;- bottom: 40px;- font-size: 22px;- font-weight: 600;- letter-spacing: 0.18em;- text-transform: uppercase;- color: rgba(255, 255, 255, 0.6);- mix-blend-mode: screen;- pointer-events: none;- }</style></head><body>@@ -74,240 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="4" data-track-index="1">- <canvas class="vfx-canvas" width="1920" height="1080" aria-hidden="true"></canvas>- <div class="label">text_spectral_rays</div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="text-spectral-rays"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="4"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- (function () {- const W = 1920;- const H = 1080;-- const defaults = {- text: "SPECTRAL",- textColor: "#f6ff7a",- bgColor: "#000000",- sweepSpeed: 1,- };- const vars = Object.assign(- {},- defaults,- window.__hyperframes && window.__hyperframes.getVariables- ? window.__hyperframes.getVariables()- : {},- );-- const canvas = document.querySelector(".vfx-canvas");- const gl = canvas.getContext("webgl", {- premultipliedAlpha: false,- preserveDrawingBuffer: true,- });-- // animated state — GSAP tweens these; mouse (the light cursor) is derived- const state = { progress: 0, effectMix: 0 };- const mouse = { x: 0, y: H * 0.5 };- const speed = Number(vars.sweepSpeed) || 1;-- // ── Rasterize the wordmark into a white MASK + a coloured SRC canvas ──- function drawWord(ctx, fill) {- ctx.clearRect(0, 0, W, H);- let fs = 340;- const stack = "900 " + fs + 'px "Arial Black", Impact, "Inter", system-ui, sans-serif';- ctx.font = stack;- const maxW = 1600;- const measured = ctx.measureText(vars.text).width || 1;- if (measured > maxW) {- fs = Math.floor((fs * maxW) / measured);- ctx.font = "900 " + fs + 'px "Arial Black", Impact, "Inter", system-ui, sans-serif';- }- ctx.textAlign = "center";- ctx.textBaseline = "middle";- ctx.fillStyle = fill;- ctx.fillText(vars.text, W * 0.5, H * 0.5);- }- const maskCanvas = document.createElement("canvas");- maskCanvas.width = W;- maskCanvas.height = H;- drawWord(maskCanvas.getContext("2d"), "#ffffff");- const colorCanvas = document.createElement("canvas");- colorCanvas.width = W;- colorCanvas.height = H;- drawWord(colorCanvas.getContext("2d"), vars.textColor);-- // ── WebGL fallback: flat fill (keeps the timeline registered) ──- if (!gl) {- const ctx = canvas.getContext("2d");- ctx.fillStyle = vars.bgColor;- ctx.fillRect(0, 0, W, H);- tl.to(state, { progress: 1, duration: 3.6, ease: "none" }, 0.2);- window.__timelines["main"] = tl;- return;- }-- const VERT = [- "attribute vec2 position;",- "varying vec2 vUv;",- "void main(){",- " vUv = position * 0.5 + 0.5;",- " gl_Position = vec4(position, 0.0, 1.0);",- "}",- ].join("\n");-- // Volumetric spectral light-rays cast by the text mask toward a moving- // light cursor — ported from the vfx-text-cursor golden sample, made- // generic (reads any text mask/colour). All state from uniforms.- const FRAG = [- "precision highp float;",- "varying vec2 vUv;",- "uniform vec2 resolution;",- "uniform vec2 mouse;",- "uniform float maskY;",- "uniform float maskScale;",- "uniform float effectMix;",- "uniform sampler2D src;",- "uniform sampler2D colorSrc;",- "#define PI 3.141593",- "#define SAMPLES 112.0",- "float hash(vec2 p){ return fract(sin(dot(p, vec2(489.0,589.0))) * 492.0) * 2.0 - 1.0; }",- "float hash(vec3 p){ return fract(sin(dot(p, vec3(489.0,589.0,58.0))) * 492.0) * 2.0 - 1.0; }",- "vec2 hash2(vec3 p){ return vec2(hash(p), hash(p + 1.0)); }",- "vec4 readMask(vec2 uv){ if(uv.x<0.0||uv.x>1.0||uv.y<0.0||uv.y>1.0){return vec4(0.0);} return texture2D(src, uv); }",- "vec4 readColor(vec2 uv){ if(uv.x<0.0||uv.x>1.0||uv.y<0.0||uv.y>1.0){return vec4(0.0);} return texture2D(colorSrc, uv); }",- "vec3 spectrum(float x){ return cos((x - vec3(0.0,0.5,1.0)) * vec3(0.6,1.0,0.5) * PI); }",- "void main(){",- " vec2 uv = vUv;",- " vec2 center = vec2(0.5, 0.5);",- " vec2 maskUv = (uv - center) / maskScale + center + vec2(0.0, maskY / resolution.y);",- " float mask = readMask(maskUv).r;",- " vec4 col0 = readColor(maskUv);",- " vec2 p = uv * 2.0 - 1.0;",- " p.x *= resolution.x / resolution.y;",- " vec2 mp = mouse / resolution;",- " mp.y = 1.0 - mp.y;",- " mp = mp * 2.0 - 1.0;",- " mp.x *= resolution.x / resolution.y;",- " vec2 rp = p;",- " vec2 d = (mp - p) / SAMPLES;",- " float acc = 0.0;",- " for(float i = 0.0; i < SAMPLES; i++){",- " rp += d;",- " rp += hash2(vec3(rp, i)) * 0.5 / SAMPLES;",- " vec2 uv2 = rp;",- " uv2.x /= resolution.x / resolution.y;",- " uv2 = uv2 * 0.5 + 0.5;",- " vec2 rayUv = (uv2 - center) / maskScale + center + vec2(0.0, maskY / resolution.y);",- " acc += readMask(rayUv).r / SAMPLES;",- " }",- " vec4 c = vec4(0.0, 0.0, 0.0, 1.0);",- " c -= acc * 0.24;",- " c += vec4(spectrum(cos(acc * 4.9)), 1.0) * acc * 3.65;",- " c.rgb = max(c.rgb - 0.035, 0.0);",- " c.rgb *= 1.16;",- " float cursorX = mouse.x / resolution.x;",- " float sweep = exp(-pow((uv.x - cursorX) * 6.2, 2.0));",- " float textProximity = smoothstep(0.006, 0.34, acc);",- " float longRay = smoothstep(0.004, 0.18, acc);",- " vec3 sweepColor = vec3(0.14, 0.65, 0.85) + spectrum(cursorX * 1.8) * 0.28;",- " c.rgb += sweepColor * sweep * (0.34 + textProximity * 2.35);",- " c.rgb += spectrum(cursorX + acc * 2.0) * longRay * 0.58;",- " c.rgb += col0.rgb * acc * 1.18;",- " c.rgb += col0.rgb * sweep * mask * 0.92;",- " c.rgb *= effectMix;",- " c.rgb = mix(c.rgb, col0.rgb, smoothstep(0.02, 0.75, col0.a));",- " c.rgb += vec3(1.0) * smoothstep(0.04, 0.38, mask) * 0.12 * effectMix;",- " float grain = hash(vec3(uv.xyy + mouse.x * 0.0007));",- " float dust = smoothstep(0.02, 0.38, acc) + smoothstep(0.03, 0.22, mask);",- " c.rgb += grain * 0.07 * (0.42 + dust) * effectMix;",- " c.rgb += spectrum(grain + cursorX) * abs(grain) * 0.045 * smoothstep(0.02, 0.5, acc) * effectMix;",- " c.a = 1.0;",- " gl_FragColor = c;",- "}",- ].join("\n");-- function compile(type, source) {- const s = gl.createShader(type);- gl.shaderSource(s, source);- gl.compileShader(s);- return s;- }- const program = gl.createProgram();- gl.attachShader(program, compile(gl.VERTEX_SHADER, VERT));- gl.attachShader(program, compile(gl.FRAGMENT_SHADER, FRAG));- gl.linkProgram(program);- gl.useProgram(program);-- function createTexture(source) {- const t = gl.createTexture();- gl.bindTexture(gl.TEXTURE_2D, t);- gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);- gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, source);- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);- gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);- return t;- }- const maskTex = createTexture(maskCanvas);- const colorTex = createTexture(colorCanvas);-- const buffer = gl.createBuffer();- gl.bindBuffer(gl.ARRAY_BUFFER, buffer);- gl.bufferData(- gl.ARRAY_BUFFER,- new Float32Array([-1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1]),- gl.STATIC_DRAW,- );- const posLoc = gl.getAttribLocation(program, "position");- const L = (n) => gl.getUniformLocation(program, n);- const uRes = L("resolution");- const uMouse = L("mouse");- const uMaskY = L("maskY");- const uMaskScale = L("maskScale");- const uMix = L("effectMix");- const uSrc = L("src");- const uColorSrc = L("colorSrc");-- function render() {- mouse.x = state.progress * W;- mouse.y = H * 0.5;- gl.viewport(0, 0, W, H);- gl.clearColor(0, 0, 0, 1);- gl.clear(gl.COLOR_BUFFER_BIT);- gl.useProgram(program);- gl.bindBuffer(gl.ARRAY_BUFFER, buffer);- gl.enableVertexAttribArray(posLoc);- gl.vertexAttribPointer(posLoc, 2, gl.FLOAT, false, 0, 0);- gl.activeTexture(gl.TEXTURE0);- gl.bindTexture(gl.TEXTURE_2D, maskTex);- gl.uniform1i(uSrc, 0);- gl.activeTexture(gl.TEXTURE1);- gl.bindTexture(gl.TEXTURE_2D, colorTex);- gl.uniform1i(uColorSrc, 1);- gl.uniform2f(uRes, W, H);- gl.uniform2f(uMouse, mouse.x, mouse.y);- gl.uniform1f(uMaskY, 0);- gl.uniform1f(uMaskScale, 1);- gl.uniform1f(uMix, state.effectMix);- gl.drawArrays(gl.TRIANGLES, 0, 6);- }- render(); // initial frame (seek-to-0 correctness)-- // All repaint via the timeline's onUpdate — fully seek-safe, no rAF.- tl.eventCallback("onUpdate", render);-- // effect punches in, the light cursor sweeps L→R across the wordmark,- // then fades for a clean loop.- tl.set(state, { progress: 0, effectMix: 0 }, 0);- tl.to(state, { effectMix: 1, duration: 0.45, ease: "power3.out" }, 0.15);- tl.to(state, { progress: 1, duration: 3.4 / speed, ease: "none" }, 0.2);- tl.to(state, { effectMix: 0, duration: 0.4, ease: "power2.in" }, 3.6);-- window.__timelines["main"] = tl;- })();+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/text-spectral-rays/scene.html b/skills/music-to-video/references/motion-primitives/text-spectral-rays/scene.htmlnew file mode 100644index 0000000000..52021df37c--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/text-spectral-rays/scene.html@@ -0,0 +1,280 @@+<template id="text-spectral-rays-template">+ <div+ data-composition-id="text-spectral-rays"+ data-composition-variables='[+ {"id":"text", "type":"string", "label":"Wordmark", "default":"SPECTRAL"},+ {"id":"textColor", "type":"color", "label":"Wordmark fill", "default":"#f6ff7a"},+ {"id":"bgColor", "type":"color", "label":"Stage background", "default":"#000000"},+ {"id":"sweepSpeed", "type":"number", "label":"Light sweep speed", "default":1, "min":0.2, "max":3, "step":0.1}+ ]'+ data-width="1920"+ data-height="1080"+ data-duration="4"+ >+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #000000;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .vfx-canvas {+ position: absolute;+ inset: 0;+ width: 1920px;+ height: 1080px;+ display: block;+ }+ .label {+ position: absolute;+ left: 48px;+ bottom: 40px;+ font-size: 22px;+ font-weight: 600;+ letter-spacing: 0.18em;+ text-transform: uppercase;+ color: rgba(255, 255, 255, 0.6);+ mix-blend-mode: screen;+ pointer-events: none;+ }+ </style>+ <canvas class="vfx-canvas" width="1920" height="1080" aria-hidden="true"></canvas>+ <div class="label">text_spectral_rays</div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ (function () {+ const W = 1920;+ const H = 1080;++ const defaults = {+ text: "SPECTRAL",+ textColor: "#f6ff7a",+ bgColor: "#000000",+ sweepSpeed: 1,+ };+ const vars = Object.assign(+ {},+ defaults,+ window.__hyperframes && window.__hyperframes.getVariables+ ? window.__hyperframes.getVariables()+ : {},+ );++ const canvas = document.querySelector(".vfx-canvas");+ const gl = canvas.getContext("webgl", {+ premultipliedAlpha: false,+ preserveDrawingBuffer: true,+ });++ // animated state — GSAP tweens these; mouse (the light cursor) is derived+ const state = { progress: 0, effectMix: 0 };+ const mouse = { x: 0, y: H * 0.5 };+ const speed = Number(vars.sweepSpeed) || 1;++ // ── Rasterize the wordmark into a white MASK + a coloured SRC canvas ──+ function drawWord(ctx, fill) {+ ctx.clearRect(0, 0, W, H);+ let fs = 340;+ const stack = "900 " + fs + 'px "Arial Black", Impact, "Inter", system-ui, sans-serif';+ ctx.font = stack;+ const maxW = 1600;+ const measured = ctx.measureText(vars.text).width || 1;+ if (measured > maxW) {+ fs = Math.floor((fs * maxW) / measured);+ ctx.font = "900 " + fs + 'px "Arial Black", Impact, "Inter", system-ui, sans-serif';+ }+ ctx.textAlign = "center";+ ctx.textBaseline = "middle";+ ctx.fillStyle = fill;+ ctx.fillText(vars.text, W * 0.5, H * 0.5);+ }+ const maskCanvas = document.createElement("canvas");+ maskCanvas.width = W;+ maskCanvas.height = H;+ drawWord(maskCanvas.getContext("2d"), "#ffffff");+ const colorCanvas = document.createElement("canvas");+ colorCanvas.width = W;+ colorCanvas.height = H;+ drawWord(colorCanvas.getContext("2d"), vars.textColor);++ // ── WebGL fallback: flat fill (keeps the timeline registered) ──+ if (!gl) {+ const ctx = canvas.getContext("2d");+ ctx.fillStyle = vars.bgColor;+ ctx.fillRect(0, 0, W, H);+ tl.to(state, { progress: 1, duration: 3.6, ease: "none" }, 0.2);+ window.__timelines["text-spectral-rays"] = tl;+ return;+ }++ const VERT = [+ "attribute vec2 position;",+ "varying vec2 vUv;",+ "void main(){",+ " vUv = position * 0.5 + 0.5;",+ " gl_Position = vec4(position, 0.0, 1.0);",+ "}",+ ].join("\n");++ // Volumetric spectral light-rays cast by the text mask toward a moving+ // light cursor — ported from the vfx-text-cursor golden sample, made+ // generic (reads any text mask/colour). All state from uniforms.+ const FRAG = [+ "precision highp float;",+ "varying vec2 vUv;",+ "uniform vec2 resolution;",+ "uniform vec2 mouse;",+ "uniform float maskY;",+ "uniform float maskScale;",+ "uniform float effectMix;",+ "uniform sampler2D src;",+ "uniform sampler2D colorSrc;",+ "#define PI 3.141593",+ "#define SAMPLES 112.0",+ "float hash(vec2 p){ return fract(sin(dot(p, vec2(489.0,589.0))) * 492.0) * 2.0 - 1.0; }",+ "float hash(vec3 p){ return fract(sin(dot(p, vec3(489.0,589.0,58.0))) * 492.0) * 2.0 - 1.0; }",+ "vec2 hash2(vec3 p){ return vec2(hash(p), hash(p + 1.0)); }",+ "vec4 readMask(vec2 uv){ if(uv.x<0.0||uv.x>1.0||uv.y<0.0||uv.y>1.0){return vec4(0.0);} return texture2D(src, uv); }",+ "vec4 readColor(vec2 uv){ if(uv.x<0.0||uv.x>1.0||uv.y<0.0||uv.y>1.0){return vec4(0.0);} return texture2D(colorSrc, uv); }",+ "vec3 spectrum(float x){ return cos((x - vec3(0.0,0.5,1.0)) * vec3(0.6,1.0,0.5) * PI); }",+ "void main(){",+ " vec2 uv = vUv;",+ " vec2 center = vec2(0.5, 0.5);",+ " vec2 maskUv = (uv - center) / maskScale + center + vec2(0.0, maskY / resolution.y);",+ " float mask = readMask(maskUv).r;",+ " vec4 col0 = readColor(maskUv);",+ " vec2 p = uv * 2.0 - 1.0;",+ " p.x *= resolution.x / resolution.y;",+ " vec2 mp = mouse / resolution;",+ " mp.y = 1.0 - mp.y;",+ " mp = mp * 2.0 - 1.0;",+ " mp.x *= resolution.x / resolution.y;",+ " vec2 rp = p;",+ " vec2 d = (mp - p) / SAMPLES;",+ " float acc = 0.0;",+ " for(float i = 0.0; i < SAMPLES; i++){",+ " rp += d;",+ " rp += hash2(vec3(rp, i)) * 0.5 / SAMPLES;",+ " vec2 uv2 = rp;",+ " uv2.x /= resolution.x / resolution.y;",+ " uv2 = uv2 * 0.5 + 0.5;",+ " vec2 rayUv = (uv2 - center) / maskScale + center + vec2(0.0, maskY / resolution.y);",+ " acc += readMask(rayUv).r / SAMPLES;",+ " }",+ " vec4 c = vec4(0.0, 0.0, 0.0, 1.0);",+ " c -= acc * 0.24;",+ " c += vec4(spectrum(cos(acc * 4.9)), 1.0) * acc * 3.65;",+ " c.rgb = max(c.rgb - 0.035, 0.0);",+ " c.rgb *= 1.16;",+ " float cursorX = mouse.x / resolution.x;",+ " float sweep = exp(-pow((uv.x - cursorX) * 6.2, 2.0));",+ " float textProximity = smoothstep(0.006, 0.34, acc);",+ " float longRay = smoothstep(0.004, 0.18, acc);",+ " vec3 sweepColor = vec3(0.14, 0.65, 0.85) + spectrum(cursorX * 1.8) * 0.28;",+ " c.rgb += sweepColor * sweep * (0.34 + textProximity * 2.35);",+ " c.rgb += spectrum(cursorX + acc * 2.0) * longRay * 0.58;",+ " c.rgb += col0.rgb * acc * 1.18;",+ " c.rgb += col0.rgb * sweep * mask * 0.92;",+ " c.rgb *= effectMix;",+ " c.rgb = mix(c.rgb, col0.rgb, smoothstep(0.02, 0.75, col0.a));",+ " c.rgb += vec3(1.0) * smoothstep(0.04, 0.38, mask) * 0.12 * effectMix;",+ " float grain = hash(vec3(uv.xyy + mouse.x * 0.0007));",+ " float dust = smoothstep(0.02, 0.38, acc) + smoothstep(0.03, 0.22, mask);",+ " c.rgb += grain * 0.07 * (0.42 + dust) * effectMix;",+ " c.rgb += spectrum(grain + cursorX) * abs(grain) * 0.045 * smoothstep(0.02, 0.5, acc) * effectMix;",+ " c.a = 1.0;",+ " gl_FragColor = c;",+ "}",+ ].join("\n");++ function compile(type, source) {+ const s = gl.createShader(type);+ gl.shaderSource(s, source);+ gl.compileShader(s);+ return s;+ }+ const program = gl.createProgram();+ gl.attachShader(program, compile(gl.VERTEX_SHADER, VERT));+ gl.attachShader(program, compile(gl.FRAGMENT_SHADER, FRAG));+ gl.linkProgram(program);+ gl.useProgram(program);++ function createTexture(source) {+ const t = gl.createTexture();+ gl.bindTexture(gl.TEXTURE_2D, t);+ gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, true);+ gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, source);+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);+ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);+ return t;+ }+ const maskTex = createTexture(maskCanvas);+ const colorTex = createTexture(colorCanvas);++ const buffer = gl.createBuffer();+ gl.bindBuffer(gl.ARRAY_BUFFER, buffer);+ gl.bufferData(+ gl.ARRAY_BUFFER,+ new Float32Array([-1, -1, 1, -1, -1, 1, -1, 1, 1, -1, 1, 1]),+ gl.STATIC_DRAW,+ );+ const posLoc = gl.getAttribLocation(program, "position");+ const L = (n) => gl.getUniformLocation(program, n);+ const uRes = L("resolution");+ const uMouse = L("mouse");+ const uMaskY = L("maskY");+ const uMaskScale = L("maskScale");+ const uMix = L("effectMix");+ const uSrc = L("src");+ const uColorSrc = L("colorSrc");++ function render() {+ mouse.x = state.progress * W;+ mouse.y = H * 0.5;+ gl.viewport(0, 0, W, H);+ gl.clearColor(0, 0, 0, 1);+ gl.clear(gl.COLOR_BUFFER_BIT);+ gl.useProgram(program);+ gl.bindBuffer(gl.ARRAY_BUFFER, buffer);+ gl.enableVertexAttribArray(posLoc);+ gl.vertexAttribPointer(posLoc, 2, gl.FLOAT, false, 0, 0);+ gl.activeTexture(gl.TEXTURE0);+ gl.bindTexture(gl.TEXTURE_2D, maskTex);+ gl.uniform1i(uSrc, 0);+ gl.activeTexture(gl.TEXTURE1);+ gl.bindTexture(gl.TEXTURE_2D, colorTex);+ gl.uniform1i(uColorSrc, 1);+ gl.uniform2f(uRes, W, H);+ gl.uniform2f(uMouse, mouse.x, mouse.y);+ gl.uniform1f(uMaskY, 0);+ gl.uniform1f(uMaskScale, 1);+ gl.uniform1f(uMix, state.effectMix);+ gl.drawArrays(gl.TRIANGLES, 0, 6);+ }+ render(); // initial frame (seek-to-0 correctness)++ // All repaint via the timeline's onUpdate — fully seek-safe, no rAF.+ tl.eventCallback("onUpdate", render);++ // effect punches in, the light cursor sweeps L→R across the wordmark,+ // then fades for a clean loop.+ tl.set(state, { progress: 0, effectMix: 0 }, 0);+ tl.to(state, { effectMix: 1, duration: 0.45, ease: "power3.out" }, 0.15);+ tl.to(state, { progress: 1, duration: 3.4 / speed, ease: "none" }, 0.2);+ tl.to(state, { effectMix: 0, duration: 0.4, ease: "power2.in" }, 3.6);++ window.__timelines["text-spectral-rays"] = tl;+ })();+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/text-wave-distort/index.html b/skills/music-to-video/references/motion-primitives/text-wave-distort/index.htmlindex 07be8e253f..2e954e194f 100644--- a/skills/music-to-video/references/motion-primitives/text-wave-distort/index.html+++ b/skills/music-to-video/references/motion-primitives/text-wave-distort/index.html@@ -14,11 +14,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -30,48 +25,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .wave-hero {- font-family: "Playfair Display", serif;- font-style: italic;- font-weight: 900;- font-size: 280px;- letter-spacing: -0.02em;- white-space: nowrap;- text-shadow: 0 0 40px rgba(168, 85, 247, 0.5);- }- .wave-hero .char {- display: inline-block;- will-change: transform;- }- /* per-char solid colors marching across a violet→cyan ramp */- .wave-hero .char:nth-child(1) {- color: #7c3aed;- }- .wave-hero .char:nth-child(2) {- color: #a855f7;- }- .wave-hero .char:nth-child(3) {- color: #d946ef;- }- .wave-hero .char:nth-child(4) {- color: #ec4899;- }- .wave-hero .char:nth-child(5) {- color: #2afff0;- }</style></head><body>@@ -83,54 +36,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2" data-track-index="1">- <div class="stage">- <div class="wave-hero" id="hero">- <span class="char">f</span><span class="char">l</span><span class="char">u</span- ><span class="char">i</span><span class="char">d</span>- </div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="text-wave-distort"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- // Explicit fromTo entry — safer than .from() in paused/seek mode- tl.fromTo(- "#hero .char",- { y: 60, opacity: 0 },- { y: 0, opacity: 1, stagger: 0.06, ease: "back.out(1.8)", duration: 0.5 },- 0.1,- );-- // Continuous wave: phase 0→4 cycles over 1.5s, amplitude envelope rise→settle- const state = { phase: 0 };- tl.to(- state,- {- phase: 4,- duration: 1.5,- ease: "none",- onUpdate: function () {- const chars = document.querySelectorAll("#hero .char");- const p = state.phase / 4;- let amp;- if (p < 0.35) amp = (p / 0.35) * 24;- else if (p < 0.7)- amp = 24 - ((p - 0.35) / 0.35) * 12; // 24 → 12- else amp = 12 - ((p - 0.7) / 0.3) * 4; // 12 → 8- chars.forEach((c, i) => {- const y = amp * Math.sin(state.phase * Math.PI * 2 + i * 0.45);- // Use gsap.set so it cooperates with GSAP's transform tracking- gsap.set(c, { y });- });- },- },- 0.65,- );-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/text-wave-distort/scene.html b/skills/music-to-video/references/motion-primitives/text-wave-distort/scene.htmlnew file mode 100644index 0000000000..4905985411--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/text-wave-distort/scene.html@@ -0,0 +1,106 @@+<template id="text-wave-distort-template">+ <div+ data-composition-id="text-wave-distort"+ data-width="1920"+ data-height="1080"+ data-duration="2"+ >+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-cyan: #2afff0;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .wave-hero {+ font-family: "Playfair Display", serif;+ font-style: italic;+ font-weight: 900;+ font-size: 280px;+ letter-spacing: -0.02em;+ white-space: nowrap;+ text-shadow: 0 0 40px rgba(168, 85, 247, 0.5);+ }+ .wave-hero .char {+ display: inline-block;+ will-change: transform;+ }+ /* per-char solid colors marching across a violet→cyan ramp */+ .wave-hero .char:nth-child(1) {+ color: #7c3aed;+ }+ .wave-hero .char:nth-child(2) {+ color: #a855f7;+ }+ .wave-hero .char:nth-child(3) {+ color: #d946ef;+ }+ .wave-hero .char:nth-child(4) {+ color: #ec4899;+ }+ .wave-hero .char:nth-child(5) {+ color: #2afff0;+ }+ </style>+ <div class="stage">+ <div class="wave-hero" id="hero">+ <span class="char">f</span><span class="char">l</span><span class="char">u</span+ ><span class="char">i</span><span class="char">d</span>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Explicit fromTo entry — safer than .from() in paused/seek mode+ tl.fromTo(+ "#hero .char",+ { y: 60, opacity: 0 },+ { y: 0, opacity: 1, stagger: 0.06, ease: "back.out(1.8)", duration: 0.5 },+ 0.1,+ );++ // Continuous wave: phase 0→4 cycles over 1.5s, amplitude envelope rise→settle+ const state = { phase: 0 };+ tl.to(+ state,+ {+ phase: 4,+ duration: 1.5,+ ease: "none",+ onUpdate: function () {+ const chars = document.querySelectorAll("#hero .char");+ const p = state.phase / 4;+ let amp;+ if (p < 0.35) amp = (p / 0.35) * 24;+ else if (p < 0.7)+ amp = 24 - ((p - 0.35) / 0.35) * 12; // 24 → 12+ else amp = 12 - ((p - 0.7) / 0.3) * 4; // 12 → 8+ chars.forEach((c, i) => {+ const y = amp * Math.sin(state.phase * Math.PI * 2 + i * 0.45);+ // Use gsap.set so it cooperates with GSAP's transform tracking+ gsap.set(c, { y });+ });+ },+ },+ 0.65,+ );++ window.__timelines["text-wave-distort"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/tile-mosaic/index.html b/skills/music-to-video/references/motion-primitives/tile-mosaic/index.htmlindex a8c95340cd..7b2c4abb3d 100644--- a/skills/music-to-video/references/motion-primitives/tile-mosaic/index.html+++ b/skills/music-to-video/references/motion-primitives/tile-mosaic/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,46 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .mosaic {- position: relative;- display: grid;- grid-template-columns: repeat(6, 1fr);- grid-template-rows: repeat(4, 1fr);- gap: 6px;- width: 1440px;- height: 960px;- }- .tile {- border-radius: 4px;- will-change: transform, opacity;- }- .title {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- font-weight: 900;- font-size: 220px;- letter-spacing: -0.03em;- color: var(--hg-fg);- text-shadow: 0 8px 40px rgba(0, 0, 0, 0.55);- will-change: transform, opacity;- pointer-events: none;- }</style></head><body>@@ -80,65 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2.4" data-track-index="1">- <div class="stage">- <div class="mosaic" id="mosaic"></div>- <div class="title" id="title">MOSAIC</div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="tile-mosaic"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2.4"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- const COLS = 6;- const ROWS = 4;- const STEP = 0.06;- // Deterministic palette; tile colour chosen by index, no randomness.- const PALETTE = [- "#7c3aed",- "#a855f7",- "#6d28d9",- "#c084fc",- "#5b21b6",- "#8b5cf6",- "#9333ea",- "#4c1d95",- ];-- const mosaic = document.getElementById("mosaic");- const tiles = [];- for (let i = 0; i < COLS * ROWS; i++) {- const row = Math.floor(i / COLS);- const col = i % COLS;- const cell = document.createElement("div");- cell.className = "tile";- const a = PALETTE[(row + col) % PALETTE.length];- const b = PALETTE[(row + col + 3) % PALETTE.length];- cell.style.background = "linear-gradient(135deg, " + a + " 0%, " + b + " 100%)";- mosaic.appendChild(cell);- tiles.push({ el: cell, diag: row + col });- }-- // Diagonal sweep: reveal order governed by (row + col), explicit per-tile timing.- for (const t of tiles) {- tl.fromTo(- t.el,- { autoAlpha: 0, scale: 0.6 },- { autoAlpha: 1, scale: 1, duration: 0.4, ease: "back.out(1.7)" },- t.diag * STEP,- );- }-- // Title settles over the finished, dense mosaic.- tl.fromTo(- "#title",- { autoAlpha: 0, scale: 1.12 },- { autoAlpha: 1, scale: 1, duration: 0.45, ease: "power2.out" },- 1.7,- );-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/tile-mosaic/scene.html b/skills/music-to-video/references/motion-primitives/tile-mosaic/scene.htmlnew file mode 100644index 0000000000..0658d59998--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/tile-mosaic/scene.html@@ -0,0 +1,109 @@+<template id="tile-mosaic-template">+ <div data-composition-id="tile-mosaic" data-width="1920" data-height="1080" data-duration="2.4">+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .mosaic {+ position: relative;+ display: grid;+ grid-template-columns: repeat(6, 1fr);+ grid-template-rows: repeat(4, 1fr);+ gap: 6px;+ width: 1440px;+ height: 960px;+ }+ .tile {+ border-radius: 4px;+ will-change: transform, opacity;+ }+ .title {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ font-weight: 900;+ font-size: 220px;+ letter-spacing: -0.03em;+ color: var(--hg-fg);+ text-shadow: 0 8px 40px rgba(0, 0, 0, 0.55);+ will-change: transform, opacity;+ pointer-events: none;+ }+ </style>+ <div class="stage">+ <div class="mosaic" id="mosaic"></div>+ <div class="title" id="title">MOSAIC</div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ const COLS = 6;+ const ROWS = 4;+ const STEP = 0.06;+ // Deterministic palette; tile colour chosen by index, no randomness.+ const PALETTE = [+ "#7c3aed",+ "#a855f7",+ "#6d28d9",+ "#c084fc",+ "#5b21b6",+ "#8b5cf6",+ "#9333ea",+ "#4c1d95",+ ];++ const mosaic = document.getElementById("mosaic");+ const tiles = [];+ for (let i = 0; i < COLS * ROWS; i++) {+ const row = Math.floor(i / COLS);+ const col = i % COLS;+ const cell = document.createElement("div");+ cell.className = "tile";+ const a = PALETTE[(row + col) % PALETTE.length];+ const b = PALETTE[(row + col + 3) % PALETTE.length];+ cell.style.background = "linear-gradient(135deg, " + a + " 0%, " + b + " 100%)";+ mosaic.appendChild(cell);+ tiles.push({ el: cell, diag: row + col });+ }++ // Diagonal sweep: reveal order governed by (row + col), explicit per-tile timing.+ for (const t of tiles) {+ tl.fromTo(+ t.el,+ { autoAlpha: 0, scale: 0.6 },+ { autoAlpha: 1, scale: 1, duration: 0.4, ease: "back.out(1.7)" },+ t.diag * STEP,+ );+ }++ // Title settles over the finished, dense mosaic.+ tl.fromTo(+ "#title",+ { autoAlpha: 0, scale: 1.12 },+ { autoAlpha: 1, scale: 1, duration: 0.45, ease: "power2.out" },+ 1.7,+ );++ window.__timelines["tile-mosaic"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/typewriter-reveal/index.html b/skills/music-to-video/references/motion-primitives/typewriter-reveal/index.htmlindex 1c5432ff97..37f75726c7 100644--- a/skills/music-to-video/references/motion-primitives/typewriter-reveal/index.html+++ b/skills/music-to-video/references/motion-primitives/typewriter-reveal/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,45 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: flex;- align-items: center;- justify-content: center;- }- .line {- display: flex;- align-items: baseline;- font-family: "JetBrains Mono", ui-monospace, monospace;- font-weight: 800;- font-size: 200px;- letter-spacing: 0.02em;- line-height: 0.95;- white-space: nowrap;- }- .char {- display: inline-block;- opacity: 0;- will-change: opacity;- }- .char.space {- width: 0.4em;- }- .caret {- display: inline-block;- width: 0.09em;- height: 0.86em;- margin-left: 0.06em;- background: var(--hg-violet-2);- will-change: opacity;- }</style></head><body>@@ -79,44 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2.4" data-track-index="1">- <div class="stage">- <div class="line" id="line">- <span class="char">S</span><span class="char">Y</span><span class="char">S</span- ><span class="char">T</span><span class="char">E</span><span class="char">M</span- ><span class="char space"> </span><span class="char">O</span- ><span class="char">N</span><span class="char">L</span><span class="char">I</span- ><span class="char">N</span><span class="char">E</span- ><span class="caret" id="caret"></span>- </div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="typewriter-reveal"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2.4"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- const chars = gsap.utils.toArray(".char");- const step = 0.07;-- // Explicit per-character reveal: one set() per char at time i * step.- chars.forEach((char, i) => {- tl.set(char, { opacity: 1 }, i * step);- });-- const lastT = (chars.length - 1) * step;-- // Caret rides just past the last revealed char and blinks a finite number- // of times (no repeat:-1), then the phrase locks crisp.- tl.set("#caret", { opacity: 1 }, 0);- tl.to(- "#caret",- { opacity: 0, duration: 0.09, ease: "steps(1)", repeat: 8, yoyo: true },- lastT + step,- );- tl.set("#caret", { opacity: 0 }, 2.32);-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/typewriter-reveal/scene.html b/skills/music-to-video/references/motion-primitives/typewriter-reveal/scene.htmlnew file mode 100644index 0000000000..0e621979ef--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/typewriter-reveal/scene.html@@ -0,0 +1,91 @@+<template id="typewriter-reveal-template">+ <div+ data-composition-id="typewriter-reveal"+ data-width="1920"+ data-height="1080"+ data-duration="2.4"+ >+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ }+ .line {+ display: flex;+ align-items: baseline;+ font-family: "JetBrains Mono", ui-monospace, monospace;+ font-weight: 800;+ font-size: 200px;+ letter-spacing: 0.02em;+ line-height: 0.95;+ white-space: nowrap;+ }+ .char {+ display: inline-block;+ opacity: 0;+ will-change: opacity;+ }+ .char.space {+ width: 0.4em;+ }+ .caret {+ display: inline-block;+ width: 0.09em;+ height: 0.86em;+ margin-left: 0.06em;+ background: var(--hg-violet-2);+ will-change: opacity;+ }+ </style>+ <div class="stage">+ <div class="line" id="line">+ <span class="char">S</span><span class="char">Y</span><span class="char">S</span+ ><span class="char">T</span><span class="char">E</span><span class="char">M</span+ ><span class="char space"> </span><span class="char">O</span><span class="char">N</span+ ><span class="char">L</span><span class="char">I</span><span class="char">N</span+ ><span class="char">E</span><span class="caret" id="caret"></span>+ </div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ const chars = gsap.utils.toArray(".char");+ const step = 0.07;++ // Explicit per-character reveal: one set() per char at time i * step.+ chars.forEach((char, i) => {+ tl.set(char, { opacity: 1 }, i * step);+ });++ const lastT = (chars.length - 1) * step;++ // Caret rides just past the last revealed char and blinks a finite number+ // of times (no repeat:-1), then the phrase locks crisp.+ tl.set("#caret", { opacity: 1 }, 0);+ tl.to(+ "#caret",+ { opacity: 0, duration: 0.09, ease: "steps(1)", repeat: 8, yoyo: true },+ lastT + step,+ );+ tl.set("#caret", { opacity: 0 }, 2.32);++ window.__timelines["typewriter-reveal"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/references/motion-primitives/word-grid-burst/index.html b/skills/music-to-video/references/motion-primitives/word-grid-burst/index.htmlindex fe56320f05..1cab802138 100644--- a/skills/music-to-video/references/motion-primitives/word-grid-burst/index.html+++ b/skills/music-to-video/references/motion-primitives/word-grid-burst/index.html@@ -13,11 +13,6 @@--hg-fg: #f5f5fa;--hg-dim: #6b6b78;}- * {- margin: 0;- padding: 0;- box-sizing: border-box;- }html,body {margin: 0;@@ -29,32 +24,6 @@color: var(--hg-fg);-webkit-font-smoothing: antialiased;}- #scene {- position: absolute;- inset: 0;- width: 1920px;- height: 1080px;- }- .stage {- position: absolute;- inset: 0;- display: grid;- grid-template-columns: repeat(5, 1fr);- grid-template-rows: repeat(3, 1fr);- align-items: center;- justify-items: center;- padding: 140px 120px;- gap: 24px;- }- .cell {- font-weight: 900;- font-size: 92px;- letter-spacing: -0.03em;- line-height: 0.95;- color: var(--hg-fg);- white-space: nowrap;- will-change: transform, opacity;- }</style></head><body>@@ -66,61 +35,19 @@data-width="1920"data-height="1080">- <div id="scene" class="clip" data-start="0" data-duration="2.8" data-track-index="1">- <div class="stage">- <div class="cell">PULSE</div>- <div class="cell">FORGE</div>- <div class="cell">SURGE</div>- <div class="cell">VOLT</div>- <div class="cell">CORE</div>- <div class="cell">FLUX</div>- <div class="cell">SPARK</div>- <div class="cell">DRIVE</div>- <div class="cell">BLAZE</div>- <div class="cell">WAVE</div>- <div class="cell">SHIFT</div>- <div class="cell">BOLT</div>- <div class="cell">RUSH</div>- <div class="cell">PEAK</div>- <div class="cell">IGNITE</div>- </div>- </div>+ <div+ id="scene"+ class="clip"+ data-composition-id="word-grid-burst"+ data-composition-src="scene.html"+ data-start="0"+ data-duration="2.8"+ data-track-index="1"+ ></div></div><script>window.__timelines = window.__timelines || {};- const tl = gsap.timeline({ paused: true });-- // Deterministic reveal order: scatter sequence across the 15-cell grid.- const order = [7, 0, 12, 4, 9, 2, 14, 6, 11, 1, 8, 3, 13, 5, 10];- const cells = gsap.utils.toArray(".cell");- const step = 0.13;- const FOCUS = 7; // chosen focal cell ("DRIVE")-- // Each cell pops in on its own "onset" — explicit per-cell timing.- order.forEach((idx, i) => {- tl.fromTo(- cells[idx],- { autoAlpha: 0, scale: 0.8 },- { autoAlpha: 1, scale: 1, duration: 0.22, ease: "back.out(1.8)" },- i * step,- );- });-- // Downbeat refocus (~2.3s): dim the whole grid, pop the focal word.- tl.to(".cell", { autoAlpha: 0.25, duration: 0.18, ease: "power2.out" }, 2.3);- tl.to(- cells[FOCUS],- {- autoAlpha: 1,- scale: 1.25,- color: "var(--hg-violet-2)",- duration: 0.22,- ease: "back.out(2)",- },- 2.32,- );-- window.__timelines["main"] = tl;+ window.__timelines["main"] = gsap.timeline({ paused: true });</script></body></html>diff --git a/skills/music-to-video/references/motion-primitives/word-grid-burst/scene.html b/skills/music-to-video/references/motion-primitives/word-grid-burst/scene.htmlnew file mode 100644index 0000000000..49c208c0d5--- /dev/null+++ b/skills/music-to-video/references/motion-primitives/word-grid-burst/scene.html@@ -0,0 +1,96 @@+<template id="word-grid-burst-template">+ <div+ data-composition-id="word-grid-burst"+ data-width="1920"+ data-height="1080"+ data-duration="2.8"+ >+ <style>+ :root {+ --hg-violet: #7c3aed;+ --hg-violet-2: #a855f7;+ --hg-bg: #0a0a0f;+ --hg-fg: #f5f5fa;+ --hg-dim: #6b6b78;+ }+ * {+ margin: 0;+ padding: 0;+ box-sizing: border-box;+ }+ .stage {+ position: absolute;+ inset: 0;+ display: grid;+ grid-template-columns: repeat(5, 1fr);+ grid-template-rows: repeat(3, 1fr);+ align-items: center;+ justify-items: center;+ padding: 140px 120px;+ gap: 24px;+ }+ .cell {+ font-weight: 900;+ font-size: 92px;+ letter-spacing: -0.03em;+ line-height: 0.95;+ color: var(--hg-fg);+ white-space: nowrap;+ will-change: transform, opacity;+ }+ </style>+ <div class="stage">+ <div class="cell">PULSE</div>+ <div class="cell">FORGE</div>+ <div class="cell">SURGE</div>+ <div class="cell">VOLT</div>+ <div class="cell">CORE</div>+ <div class="cell">FLUX</div>+ <div class="cell">SPARK</div>+ <div class="cell">DRIVE</div>+ <div class="cell">BLAZE</div>+ <div class="cell">WAVE</div>+ <div class="cell">SHIFT</div>+ <div class="cell">BOLT</div>+ <div class="cell">RUSH</div>+ <div class="cell">PEAK</div>+ <div class="cell">IGNITE</div>+ </div>+ <script>+ window.__timelines = window.__timelines || {};+ const tl = gsap.timeline({ paused: true });++ // Deterministic reveal order: scatter sequence across the 15-cell grid.+ const order = [7, 0, 12, 4, 9, 2, 14, 6, 11, 1, 8, 3, 13, 5, 10];+ const cells = gsap.utils.toArray(".cell");+ const step = 0.13;+ const FOCUS = 7; // chosen focal cell ("DRIVE")++ // Each cell pops in on its own "onset" — explicit per-cell timing.+ order.forEach((idx, i) => {+ tl.fromTo(+ cells[idx],+ { autoAlpha: 0, scale: 0.8 },+ { autoAlpha: 1, scale: 1, duration: 0.22, ease: "back.out(1.8)" },+ i * step,+ );+ });++ // Downbeat refocus (~2.3s): dim the whole grid, pop the focal word.+ tl.to(".cell", { autoAlpha: 0.25, duration: 0.18, ease: "power2.out" }, 2.3);+ tl.to(+ cells[FOCUS],+ {+ autoAlpha: 1,+ scale: 1.25,+ color: "var(--hg-violet-2)",+ duration: 0.22,+ ease: "back.out(2)",+ },+ 2.32,+ );++ window.__timelines["word-grid-burst"] = tl;+ </script>+ </div>+</template>diff --git a/skills/music-to-video/sub-agents/frame-worker.md b/skills/music-to-video/sub-agents/frame-worker.mdindex 84d93082ee..2f9b9d8b76 100644--- a/skills/music-to-video/sub-agents/frame-worker.md+++ b/skills/music-to-video/sub-agents/frame-worker.md@@ -16,7 +16,7 @@ Your job: **follow the manual, fetch the materials, assemble.** The storyboard t- **asset** — `asset:{treatment, clips, anchors?, overlay_copy?}` (see `montage.md`).- `audiomap.json` — timing truth; use the seconds you're given.- `frame.md` — the brand (palette + type). Pull every visual token from here.-- **Materials** — `references/templates/<id>/index.html` (its `data-composition-variables` give the param semantics) for template groups; `references/motion-primitives/<id>/index.html` for free groups; staged `assets/…` for asset groups.+- **Materials** — `references/templates/<id>/index.html` (its `data-composition-variables` give the param semantics) for template groups; `references/motion-primitives/<id>/scene.html` (the sub-composition; `index.html` only mounts it and holds the page background and font) for free groups; staged `assets/…` for asset groups.- Canvas `<width>×<height>` and the frame's `pacing`.If your dispatch carries `lint` / `check` feedback from a prior pass, address each finding.