Skip to content

Commit 04827b9

Browse files
committed
feat(skill): examples library scaffold + section 01 (typography) — 10 scenes
First slice of the HyperFrames Capability Showcase library at skills/website-to-hyperframes/examples/. Each scene is a self-contained mini-project (index.html in its own directory) that lints, snapshots, and renders standalone. Section 01 (typography) — 10 production-grade scenes, all PASS QC: 01 soft-blur-in — Apple keynote per-character reveal 02 typewriter-mechanical — stepped per-char terminal type-on 03 kinetic-center-build — words push in right-to-left, lock center 04 line-reveal-staggered — editorial mask-reveal-up with Fraunces italic 05 stagger-wave — center-out vs edges-in stagger origins 06 variable-font-weight-shift — wght 100→900 animation via @Property 07 shared-axis-crossfade — Material Design Z-axis depth transition 08 glitch-rgb-split — RGB channel offset with mechanical jitter 09 scramble-decrypt — per-char intermediate substitution decrypt 10 per-word-emphasis — per-word crossfade + hand-drawn marker Plus catalog + shared assets: - examples/README.md — top-level index + lookup by technique - 01-typography/README.md — section spec + QC log per scene - _shared/hyper-shader-local.js — copied from packages/shader-transitions/dist/ - _shared/shared-styles.css — design tokens - _shared/easing-glossary.md — single source of truth for easings Authoring conventions are documented in examples/README.md so future scenes follow the same shape: full HTML doc, GSAP CDN, CustomEase, data-composition-id/ start/duration/width/height on root, scene-label at bottom-left, continuous motion (no static periods >1.5s), easing variety (3+ different easings). .gitignore: fixed bare 'examples/' rule (matched anywhere) to '/examples/' (root-only), and added rule to skip snapshot artifacts inside the library.
1 parent e1bd22d commit 04827b9

16 files changed

Lines changed: 4467 additions & 1 deletion

File tree

‎.gitignore‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,11 @@ packages/producer/src/services/fontData.generated.ts
6666

6767
# Test artifacts
6868
my-video/
69-
examples/
69+
/examples/
7070
packages/studio/data/
71+
72+
# Snapshot artifacts inside the w2h examples library — regenerated on demand
73+
skills/website-to-hyperframes/examples/**/snapshots/
7174
.desloppify/
7275
.worktrees/
7376

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Section 01 — Typography
2+
3+
10 scenes covering the most-used text animation effects from `skills/hyperframes/references/text-effects.md` plus 3 custom techniques (variable-font weight shift, glitch RGB split, scramble decrypt) that aren't in the catalog but are heavily-used in modern marketing video.
4+
5+
**When to study this section:** any beat where text is the hero — headlines, statements, eyebrows, call-to-action copy, kinetic typography sequences.
6+
7+
---
8+
9+
## Scenes
10+
11+
Each scene is its own subdirectory containing `index.html` — standalone, renderable on its own via `npx tsx packages/cli/src/cli.ts snapshot scene-NN-name --frames 5`.
12+
13+
| Scene | Duration | Technique | Catalog spec |
14+
|-------|----------|-----------|--------------|
15+
| [`scene-01-soft-blur-in/`](scene-01-soft-blur-in/) | 8s | Per-character fade with blur and upward drift — Apple keynote hero | `skills/hyperframes/assets/text-effects/effects/soft-blur-in.json` |
16+
| [`scene-02-typewriter-mechanical/`](scene-02-typewriter-mechanical/) | 6s | Stepped per-character reveal, no easing curve — terminal/editorial feel | `skills/hyperframes/assets/text-effects/effects/typewriter.json` |
17+
| [`scene-03-kinetic-center-build/`](scene-03-kinetic-center-build/) | 8s | Each word locks center as phrase builds right-to-left with soft blur | `skills/hyperframes/assets/text-effects/effects/kinetic-center-build.json` |
18+
| [`scene-04-line-reveal-staggered/`](scene-04-line-reveal-staggered/) | 7s | Lines clip-reveal upward with stagger — masked, contained, intentional | `skills/hyperframes/assets/text-effects/effects/mask-reveal-up.json` |
19+
| [`scene-05-stagger-wave/`](scene-05-stagger-wave/) | 6s | Per-character rise with a wave timing curve (center-out, then edges-in) | `skills/hyperframes/assets/text-effects/effects/per-character-rise.json` + custom stagger |
20+
| [`scene-06-variable-font-weight-shift/`](scene-06-variable-font-weight-shift/) | 7s | Headline animates `font-variation-settings` from `wght 100` to `wght 900` — kinetic without translation | Custom (uses Inter variable) |
21+
| [`scene-07-shared-axis-crossfade/`](scene-07-shared-axis-crossfade/) | 9s | Two phrases swap via scale-Z depth crossfade — premium UI feel | `skills/hyperframes/assets/text-effects/effects/shared-axis-z.json` |
22+
| [`scene-08-glitch-rgb-split/`](scene-08-glitch-rgb-split/) | 5s | RGB-channel split with mechanical jitter — digital/cyberpunk emphasis | Custom (CSS text-shadow + offset GSAP jitter) |
23+
| [`scene-09-scramble-decrypt/`](scene-09-scramble-decrypt/) | 6s | Character scramble decrypts into final phrase — "intel/hacker" feel | Custom (per-character substitute) |
24+
| [`scene-10-per-word-emphasis/`](scene-10-per-word-emphasis/) | 8s | Per-word crossfade with a hand-drawn circle marker landing on the key word | `per-word-crossfade.json` + section 02 marker |
25+
26+
---
27+
28+
## What to study, in priority order
29+
30+
1. **`scene-01-soft-blur-in.html`** — the canonical premium headline. Study how character splitting works, how the JSON spec maps to GSAP, how the y-travel-multiplier scales motion to 1080p.
31+
2. **`scene-02-typewriter-mechanical.html`** — the simplest type-on. Study `steps(1)` ease and why it gives a terminal feel.
32+
3. **`scene-10-per-word-emphasis.html`** — combination scene. Study how text effect + marker overlay are sequenced with `tl.add()` and overlap timing.
33+
34+
After these three, the others are variations on the same shape.
35+
36+
---
37+
38+
## QC log
39+
40+
Updated after building each scene. Format: `[PASS]` or `[REBUILD: reason]` or `[FIXED: reason]`.
41+
42+
- scene-01: **PASS** — 8 frames show 3 phrases cycling (Think different. → Built to flow. → Motion with intent.) with soft-blur per-character entrance, underline draw, grain drift, scale pulse during holds. Frame 1 correctly dark; mid-exit frames show in-progress blur correctly.
43+
- scene-02: **PASS** — 6 frames show empty terminal → "Precision in motion." typed in → hold → exit → "Pause. Continue." typed in → final hold. Steps(1) easing visible per-char. Cursor blinks. Scanlines drift. Cursor glow pulses during holds. Phrase 2 shortened from "Write. Pause. Continue." to "Pause. Continue." to avoid text wrap.
44+
- scene-03: **PASS** — 8 frames show kinetic-center-build: words push in from right, locking at center as phrase builds. Two phrases cycle ("Built to flow." then "Motion with intent."). Mid-build frames clearly show the layout-aware push behavior. 6 distinct easings, breathing during holds.
45+
- scene-04: **PASS** — 7 frames show editorial mask-reveal-up: lines clip-reveal upward staggered. Beautiful Fraunces italic accent on "everything." word, gold accent rule + page number, vignette drift continuously. 7 distinct easings including the spec's signature curve. Fix during build: moved breathing tween off the same element as entrance tween to avoid transform conflict.
46+
- scene-05: **PASS** — 6 frames show stagger-wave (center-out vs edges-in) side-by-side. Mid-entrance frames at 1.2s ("e from cent" center visible) and 3.6s ("Wave" + "dges." edges visible, middle hidden) prove the wave origin behavior. Yellow accent band + origin markers ground the typography. 9 distinct easings.
47+
- scene-06: **PASS** — 7 frames show variable-font weight ramp wht 100→900. Frame at 1.2s shows the money moment: "WE" already bold, "IGHT." still thin — staggered weight shift left-to-right. Fix during build: replaced JS proxy object + onUpdate (broke under seek) with native GSAP CSS variable tween + @property registration.
48+
- scene-07: **PASS** — 9 frames show shared-axis-z depth crossfade across 3 phrases. Mid-swap frames at 2.3s and 4.5s clearly show outgoing phrase scaling toward camera with motion blur while incoming phrase emerges from depth. Material Design Z-axis transition unmistakable.
49+
- scene-08: **PASS** — 5 frames; 3 catch RGB-split glitch peaks (red/cyan channel offsets), 2 show clean settled state. Burst timestamps deliberately aligned with snapshot timestamps so peaks are caught. CRT scanlines, HUD corner brackets, status meta line. Cyberpunk vibe nailed.
50+
- scene-09: **PASS** — 6 frames show scramble decrypt: initial scramble glyphs → left-to-right lock to "AUTHENTICATED" → hold bright → re-encrypt (rightmost chars last to unlock with different intermediate chars proving deterministic-but-distinct generation) → re-decrypt. Cursor blink, scanline, status dot all running continuously.
51+
- scene-10: **PASS** — 8 frames; warm off-white paper background. Per-word crossfade entrance, hand-drawn orange ellipse marker draws around "intention" with stroke-dasharray, then secondary mark + handwritten "on purpose" arrow in Caveat font. Two transform-conflict bugs found and fixed during build (initial stroke visibility, linecap artifact at zero-dash).
Lines changed: 310 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,310 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>scene-01-soft-blur-in</title>
6+
<link rel="preconnect" href="https://fonts.googleapis.com" />
7+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
8+
<link
9+
href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap"
10+
rel="stylesheet"
11+
/>
12+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/gsap.min.js"></script>
13+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/CustomEase.min.js"></script>
14+
<style>
15+
* { margin: 0; padding: 0; box-sizing: border-box; }
16+
body { background: #0a0a0a; }
17+
18+
#scene-01-soft-blur-in {
19+
position: relative;
20+
overflow: hidden;
21+
background: radial-gradient(ellipse at 50% 45%, #1a1a1a 0%, #0a0a0a 65%);
22+
font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
23+
-webkit-font-smoothing: antialiased;
24+
color: #f5f5f5;
25+
}
26+
27+
/* Stage: centered phrase host. perspective_px=900 from soft-blur-in.json. */
28+
.stage {
29+
position: absolute;
30+
inset: 0;
31+
display: flex;
32+
flex-direction: column;
33+
align-items: center;
34+
justify-content: center;
35+
perspective: 900px;
36+
}
37+
38+
.phrase-row {
39+
position: relative;
40+
width: 100%;
41+
display: flex;
42+
align-items: center;
43+
justify-content: center;
44+
transform-style: preserve-3d;
45+
min-height: 160px;
46+
}
47+
48+
.phrase {
49+
position: absolute;
50+
display: inline-block;
51+
transform-style: preserve-3d;
52+
font-size: 144px;
53+
font-weight: 700;
54+
letter-spacing: -0.02em;
55+
line-height: 1.05;
56+
white-space: nowrap;
57+
}
58+
59+
/* Per-character unit — see showcase.stage.unit in soft-blur-in.json.
60+
Initial opacity:0 locks the pre-entrance state in CSS so the snapshot
61+
tool's first-frame capture (before the GSAP timeline has time to apply
62+
its t=0 set tweens) shows the correct blank state. */
63+
.char {
64+
display: inline-block;
65+
white-space: pre;
66+
backface-visibility: hidden;
67+
transform-origin: 50% 55%;
68+
will-change: transform, opacity, filter;
69+
opacity: 0;
70+
filter: blur(12px);
71+
transform: translateY(24px);
72+
}
73+
74+
/* Same lock for eyebrow and underline initial states */
75+
.eyebrow { opacity: 0; }
76+
.underline path { stroke-dasharray: 240 240; stroke-dashoffset: 240; }
77+
78+
.eyebrow {
79+
position: absolute;
80+
top: calc(50% - 130px);
81+
left: 50%;
82+
transform: translateX(-50%);
83+
font-size: 18px;
84+
font-weight: 500;
85+
letter-spacing: 0.32em;
86+
text-transform: uppercase;
87+
color: #707070;
88+
}
89+
90+
.underline {
91+
position: absolute;
92+
top: calc(50% + 110px);
93+
left: 50%;
94+
width: 240px;
95+
height: 2px;
96+
transform: translateX(-50%);
97+
}
98+
.underline path {
99+
stroke: #f5f5f5;
100+
stroke-width: 2;
101+
fill: none;
102+
}
103+
104+
.grain {
105+
position: absolute;
106+
inset: -50px;
107+
background: radial-gradient(circle at 20% 30%, rgba(255,255,255,0.04) 0%, transparent 40%),
108+
radial-gradient(circle at 80% 70%, rgba(255,255,255,0.03) 0%, transparent 35%);
109+
pointer-events: none;
110+
will-change: transform, opacity;
111+
}
112+
113+
.label {
114+
position: absolute;
115+
left: 48px;
116+
bottom: 48px;
117+
font-size: 16px;
118+
color: #707070;
119+
letter-spacing: 0.08em;
120+
text-transform: uppercase;
121+
font-weight: 500;
122+
z-index: 10;
123+
}
124+
.label .accent { color: #f5f5f5; font-weight: 600; }
125+
</style>
126+
</head>
127+
<body>
128+
129+
<div id="scene-01-soft-blur-in"
130+
data-composition-id="scene-01-soft-blur-in"
131+
data-start="0"
132+
data-duration="8"
133+
data-width="1920"
134+
data-height="1080"
135+
style="width:1920px; height:1080px;">
136+
137+
<div class="grain"></div>
138+
139+
<div class="stage">
140+
<div class="eyebrow" id="eyebrow">Section 01 · Typography</div>
141+
<div class="phrase-row">
142+
<div class="phrase" data-phrase="0">Think different.</div>
143+
<div class="phrase" data-phrase="1">Built to flow.</div>
144+
<div class="phrase" data-phrase="2">Motion with intent.</div>
145+
</div>
146+
<svg class="underline" viewBox="0 0 240 2">
147+
<path id="underline-path" d="M 0 1 L 240 1" />
148+
</svg>
149+
</div>
150+
151+
<div class="label">
152+
Scene 01 · <span class="accent">Soft Blur In</span> · per-character keynote reveal
153+
</div>
154+
</div>
155+
156+
<script>
157+
(function () {
158+
var BEAT = 8;
159+
window.__timelines = window.__timelines || {};
160+
161+
gsap.registerPlugin(CustomEase);
162+
163+
// soft-blur-in signature easing — Apple keynote curve.
164+
var softEase = CustomEase.create("soft", "0.22, 1, 0.36, 1");
165+
// Exit easing — accelerated, from soft-blur-in.json portable_spec.exit.easing.
166+
var exitEase = CustomEase.create("softExit", "0.64, 0, 0.78, 0");
167+
168+
// Split each phrase into per-character spans at build time. All three
169+
// phrases live in the DOM simultaneously (stacked, position:absolute)
170+
// and we toggle visibility through opacity timeline. This makes the
171+
// composition seekable — snapshot tool jumps to any timestamp and
172+
// the DOM is already populated, no callback-driven mutation required.
173+
function splitPhrase(phraseEl) {
174+
var text = phraseEl.textContent;
175+
var spans = [];
176+
var frag = document.createDocumentFragment();
177+
Array.from(text).forEach(function (ch) {
178+
var span = document.createElement("span");
179+
span.className = "char";
180+
span.textContent = ch === " " ? " " : ch;
181+
frag.appendChild(span);
182+
spans.push(span);
183+
});
184+
phraseEl.replaceChildren(frag);
185+
return spans;
186+
}
187+
188+
var phraseEls = document.querySelectorAll("#scene-01-soft-blur-in .phrase");
189+
var charsByPhrase = [];
190+
phraseEls.forEach(function (el) {
191+
charsByPhrase.push(splitPhrase(el));
192+
});
193+
194+
var Y_FROM = 24; // scaled from spec y_px=16 for 1080p host
195+
var BLUR_FROM = 12; // spec blur_px
196+
197+
var tl = gsap.timeline({ paused: true });
198+
199+
// === t=0 initial state — ALL phrases hidden + pre-positioned, eyebrow hidden, underline empty.
200+
tl.set(charsByPhrase[0], { opacity: 0, y: Y_FROM, filter: "blur(" + BLUR_FROM + "px)" }, 0);
201+
tl.set(charsByPhrase[1], { opacity: 0, y: Y_FROM, filter: "blur(" + BLUR_FROM + "px)" }, 0);
202+
tl.set(charsByPhrase[2], { opacity: 0, y: Y_FROM, filter: "blur(" + BLUR_FROM + "px)" }, 0);
203+
tl.set("#eyebrow", { opacity: 0, y: -8 }, 0);
204+
tl.set("#underline-path", { strokeDasharray: "240 240", strokeDashoffset: 240 }, 0);
205+
206+
// === t=0.3s: eyebrow slides in. Supporting move, layered with main entrance.
207+
tl.fromTo("#eyebrow",
208+
{ opacity: 0, y: -8 },
209+
{ opacity: 1, y: 0, duration: 0.6, ease: "expo.out" },
210+
0.30);
211+
212+
// === t=0.5s: phrase 1 enters per-character.
213+
// soft-blur-in spec: scaled_duration 648ms, scaled_stagger 18ms, signature easing.
214+
tl.to(charsByPhrase[0], {
215+
opacity: 1,
216+
y: 0,
217+
filter: "blur(0px)",
218+
duration: 0.648,
219+
stagger: 0.018,
220+
ease: softEase,
221+
}, 0.50);
222+
223+
// === t=1.4s: underline draws under phrase. Variety in easing — power4.out for the line snap.
224+
tl.to("#underline-path", {
225+
strokeDashoffset: 0,
226+
duration: 0.7,
227+
ease: "power4.out",
228+
}, 1.40);
229+
230+
// === Continuous motion 1.4s-3.0s: grain ambient drift. Keeps the frame alive
231+
// while the phrase is static — no element sits unchanged for more than ~1.5s.
232+
tl.to(".grain", {
233+
x: -30,
234+
y: -10,
235+
opacity: 0.7,
236+
duration: 1.6,
237+
ease: "sine.inOut",
238+
}, 1.40);
239+
240+
// === t=3.0s: phrase 1 exits.
241+
// exit duration scaled to 432ms, stagger 11ms, exit easing curve from spec.
242+
tl.to(charsByPhrase[0], {
243+
opacity: 0,
244+
y: -Y_FROM,
245+
filter: "blur(" + BLUR_FROM + "px)",
246+
duration: 0.432,
247+
stagger: 0.011,
248+
ease: exitEase,
249+
}, 3.00);
250+
251+
// === t=3.5s: phrase 2 enters (300ms overlap with phrase 1's exit per spec.swap.overlap_ms=300).
252+
tl.to(charsByPhrase[1], {
253+
opacity: 1,
254+
y: 0,
255+
filter: "blur(0px)",
256+
duration: 0.648,
257+
stagger: 0.018,
258+
ease: softEase,
259+
}, 3.50);
260+
261+
// === Continuous motion 4.5s-5.4s: underline scale pulse.
262+
tl.to(".underline", {
263+
scale: 1.08,
264+
duration: 0.45,
265+
ease: "sine.inOut",
266+
yoyo: true,
267+
repeat: 1,
268+
transformOrigin: "50% 50%",
269+
}, 4.50);
270+
271+
// === t=5.4s: phrase 2 exits.
272+
tl.to(charsByPhrase[1], {
273+
opacity: 0,
274+
y: -Y_FROM,
275+
filter: "blur(" + BLUR_FROM + "px)",
276+
duration: 0.432,
277+
stagger: 0.011,
278+
ease: exitEase,
279+
}, 5.40);
280+
281+
// === t=5.9s: phrase 3 enters. Held until end of beat.
282+
tl.to(charsByPhrase[2], {
283+
opacity: 1,
284+
y: 0,
285+
filter: "blur(0px)",
286+
duration: 0.648,
287+
stagger: 0.018,
288+
ease: softEase,
289+
}, 5.90);
290+
291+
// === Continuous motion 6.7s-8.0s: subtle breathing on the final phrase + grain return.
292+
tl.to(charsByPhrase[2], {
293+
y: -4,
294+
duration: 1.3,
295+
ease: "sine.inOut",
296+
stagger: 0.005,
297+
}, 6.70);
298+
tl.to(".grain", {
299+
x: 0,
300+
y: 0,
301+
opacity: 1,
302+
duration: 1.3,
303+
ease: "sine.inOut",
304+
}, 6.70);
305+
306+
window.__timelines["scene-01-soft-blur-in"] = tl;
307+
})();
308+
</script>
309+
</body>
310+
</html>

0 commit comments

Comments
 (0)