hyperframes 0.6.96 → 0.6.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/beat-analyzer.global.js +326 -0
- package/dist/cli.js +3058 -1947
- package/dist/commands/layout-audit.browser.js +86 -0
- package/dist/hyperframe-runtime.js +20 -20
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +20 -20
- package/dist/skills/hyperframes-cli/SKILL.md +67 -103
- package/dist/skills/hyperframes-cli/references/doctor-browser.md +45 -0
- package/dist/skills/hyperframes-cli/references/init-and-scaffold.md +51 -0
- package/dist/skills/hyperframes-cli/references/lambda.md +132 -0
- package/dist/skills/hyperframes-cli/references/lint-validate-inspect.md +93 -0
- package/dist/skills/hyperframes-cli/references/preview-render.md +107 -0
- package/dist/skills/hyperframes-cli/references/upgrade-info-misc.md +75 -0
- package/dist/studio/assets/hyperframes-player-DgsMQSvV.js +418 -0
- package/dist/studio/assets/index-B62bDCQv.css +1 -0
- package/dist/studio/assets/index-Ce3pBm_I.js +252 -0
- package/dist/studio/assets/{index-BWFaypdT.js → index-D-ET9M0b.js} +1 -1
- package/dist/studio/assets/index-D-bS9Dxx.js +1 -0
- package/dist/studio/index.html +2 -2
- package/dist/templates/_shared/AGENTS.md +46 -21
- package/dist/templates/_shared/CLAUDE.md +16 -14
- package/package.json +3 -2
- package/dist/pngDecodeBlitWorker.js +0 -239
- package/dist/skills/gsap/SKILL.md +0 -240
- package/dist/skills/gsap/references/effects.md +0 -297
- package/dist/skills/gsap/scripts/extract-audio-data.py +0 -188
- package/dist/skills/hyperframes/SKILL.md +0 -491
- package/dist/skills/hyperframes/data-in-motion.md +0 -19
- package/dist/skills/hyperframes/house-style.md +0 -73
- package/dist/skills/hyperframes/palettes/bold-energetic.md +0 -14
- package/dist/skills/hyperframes/palettes/clean-corporate.md +0 -14
- package/dist/skills/hyperframes/palettes/dark-premium.md +0 -14
- package/dist/skills/hyperframes/palettes/jewel-rich.md +0 -14
- package/dist/skills/hyperframes/palettes/monochrome.md +0 -14
- package/dist/skills/hyperframes/palettes/nature-earth.md +0 -14
- package/dist/skills/hyperframes/palettes/neon-electric.md +0 -14
- package/dist/skills/hyperframes/palettes/pastel-soft.md +0 -14
- package/dist/skills/hyperframes/palettes/warm-editorial.md +0 -14
- package/dist/skills/hyperframes/patterns.md +0 -191
- package/dist/skills/hyperframes/references/audio-reactive.md +0 -76
- package/dist/skills/hyperframes/references/beat-direction.md +0 -171
- package/dist/skills/hyperframes/references/captions.md +0 -163
- package/dist/skills/hyperframes/references/css-patterns.md +0 -373
- package/dist/skills/hyperframes/references/design-picker.md +0 -117
- package/dist/skills/hyperframes/references/dynamic-techniques.md +0 -102
- package/dist/skills/hyperframes/references/html-in-canvas-patterns.md +0 -507
- package/dist/skills/hyperframes/references/motion-principles.md +0 -150
- package/dist/skills/hyperframes/references/narration.md +0 -92
- package/dist/skills/hyperframes/references/prompt-expansion.md +0 -68
- package/dist/skills/hyperframes/references/techniques.md +0 -525
- package/dist/skills/hyperframes/references/text-effects.md +0 -64
- package/dist/skills/hyperframes/references/transcript-guide.md +0 -107
- package/dist/skills/hyperframes/references/transitions/catalog.md +0 -117
- package/dist/skills/hyperframes/references/transitions/css-3d.md +0 -12
- package/dist/skills/hyperframes/references/transitions/css-blur.md +0 -51
- package/dist/skills/hyperframes/references/transitions/css-cover.md +0 -43
- package/dist/skills/hyperframes/references/transitions/css-destruction.md +0 -95
- package/dist/skills/hyperframes/references/transitions/css-dissolve.md +0 -66
- package/dist/skills/hyperframes/references/transitions/css-distortion.md +0 -45
- package/dist/skills/hyperframes/references/transitions/css-grid.md +0 -10
- package/dist/skills/hyperframes/references/transitions/css-light.md +0 -49
- package/dist/skills/hyperframes/references/transitions/css-mechanical.md +0 -30
- package/dist/skills/hyperframes/references/transitions/css-other.md +0 -25
- package/dist/skills/hyperframes/references/transitions/css-push.md +0 -41
- package/dist/skills/hyperframes/references/transitions/css-radial.md +0 -37
- package/dist/skills/hyperframes/references/transitions/css-scale.md +0 -24
- package/dist/skills/hyperframes/references/transitions.md +0 -138
- package/dist/skills/hyperframes/references/typography.md +0 -175
- package/dist/skills/hyperframes/references/video-composition.md +0 -62
- package/dist/skills/hyperframes/scripts/animation-map.mjs +0 -601
- package/dist/skills/hyperframes/scripts/contrast-report.mjs +0 -348
- package/dist/skills/hyperframes/scripts/package-loader.mjs +0 -269
- package/dist/skills/hyperframes/templates/design-picker.html +0 -1432
- package/dist/skills/hyperframes/visual-styles.md +0 -443
- package/dist/studio/assets/hyperframes-player-0esDKGRk.js +0 -418
- package/dist/studio/assets/index-B0twsRu0.css +0 -1
- package/dist/studio/assets/index-BA979yF1.js +0 -251
|
@@ -1,525 +0,0 @@
|
|
|
1
|
-
# Visual Techniques Reference
|
|
2
|
-
|
|
3
|
-
13 primitive animation techniques from production HyperFrames videos — SVG drawing, kinetic typography, variable fonts, WebGL shaders, motion-path, etc. Compose these into beats; they are the building blocks, not finished recipes. Each entry includes a minimal code pattern you can adapt.
|
|
4
|
-
|
|
5
|
-
These are NOT advanced — they're standard motion design patterns that every composition should use at least 2-3 of. For pre-built UI templates (terminal chrome, device mockups, moodboard layouts), look in the `registry/blocks/` directory instead — those are recipes, not techniques.
|
|
6
|
-
|
|
7
|
-
**These are starting points, not copy-paste templates.** Every code pattern below is a minimal working example from a real production video. Adapt them to your needs — change colors, sizes, timings, easings, element counts, layout. Combine techniques, mix parts from different patterns, invent variations. The goal is to understand the PRINCIPLE behind each technique so you can build something original, not to reproduce these examples exactly.
|
|
8
|
-
|
|
9
|
-
## Table of Contents
|
|
10
|
-
|
|
11
|
-
**Named text animation effects** (per-character, per-word, per-line, whole-element) — 24 effects with exact GSAP specs come from the separate `pixel-point/animate-text` skill. See [`text-effects.md`](text-effects.md) for the effect-name vocabulary and instructions for loading the upstream skill. Use those for all headline and label animations instead of inventing timing from scratch.
|
|
12
|
-
|
|
13
|
-
**HTML-in-Canvas patterns** (live DOM as GPU texture: iPhone/MacBook mockups, liquid glass, magnetic, portal, shatter, text cursor — using `drawElementImage` + `layoutsubtree`) are in [`html-in-canvas-patterns.md`](html-in-canvas-patterns.md) — 504 lines, one shared boilerplate + ~6 effect recipes. Use for 1–3 hero beats per video, not every beat.
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
| # | Technique | What it does | Best for |
|
|
18
|
-
| --- | --------------------------------- | -------------------------------------------------------------------------- | ---------------------------------------------- |
|
|
19
|
-
| 1 | **SVG Path Drawing** | Logos/icons draw themselves stroke by stroke | Logo reveals, diagram builds, connector lines |
|
|
20
|
-
| 2 | **Canvas 2D Procedural Art** | Animated noise, particles, data viz — frame-by-frame via GSAP proxy | Generative backgrounds, ambient texture |
|
|
21
|
-
| 3 | **CSS 3D Transforms** | Card flips, perspective grids, folding panels | Product reveals, comparison scenes |
|
|
22
|
-
| 4 | **Per-Word Kinetic Typography** | Text animates word-by-word with stagger timing | Thesis statements, key messages, quotes |
|
|
23
|
-
| 5 | **Lottie Animation** | Captured or external Lottie plays as overlay/background | Brand animations, micro-interactions |
|
|
24
|
-
| 6 | **Video Compositing** | Product videos play inline, masked, overlaid | Demo footage, screen recordings |
|
|
25
|
-
| 7 | **Character-by-Character Typing** | Terminal-style code reveals, search bar interactions | Developer tools, CLI demos |
|
|
26
|
-
| 8 | **Variable Font Axis Animation** | Weight, width, slant, optical size morph over time | Premium typography, brand wordmarks |
|
|
27
|
-
| 9 | **GSAP MotionPathPlugin** | Elements follow SVG curves, orbital motion, spirals | Dynamic entrances, connector animations |
|
|
28
|
-
| 10 | **Velocity-Matched Transitions** | Outgoing blur/translate matches incoming for seamless cuts | Beat transitions, scene changes |
|
|
29
|
-
| 11 | **Audio-Reactive Animation** | Elements pulse to narration frequency bands | Background textures, text glow, ambient motion |
|
|
30
|
-
| 12 | **Clip-Path Reveal Masks** | Fixed window that content slides through (text/images enter from one side) | Headline intros, image reveals, wipe effects |
|
|
31
|
-
| 13 | **WebGL Fragment Shader Art** | Full GPU generative backgrounds — FBM domain warp, cosine palettes | Hero backgrounds, atmospheric scenes |
|
|
32
|
-
|
|
33
|
-
---
|
|
34
|
-
|
|
35
|
-
## 1. SVG Path Drawing
|
|
36
|
-
|
|
37
|
-
A path draws itself in real-time, like someone tracing with a pen. Use for revealing diagrams, arrows, connector lines, or brand marks.
|
|
38
|
-
|
|
39
|
-
```html
|
|
40
|
-
<svg viewBox="0 0 400 200">
|
|
41
|
-
<path
|
|
42
|
-
class="draw-path"
|
|
43
|
-
d="M 50 100 L 200 50 L 350 100"
|
|
44
|
-
stroke="#c84f1c"
|
|
45
|
-
stroke-width="4"
|
|
46
|
-
fill="none"
|
|
47
|
-
stroke-linecap="round"
|
|
48
|
-
/>
|
|
49
|
-
</svg>
|
|
50
|
-
<style>
|
|
51
|
-
.draw-path {
|
|
52
|
-
stroke-dasharray: 280;
|
|
53
|
-
stroke-dashoffset: 280;
|
|
54
|
-
}
|
|
55
|
-
</style>
|
|
56
|
-
<script>
|
|
57
|
-
tl.to(".draw-path", { strokeDashoffset: 0, duration: 0.7, ease: "power2.out" }, 0.5);
|
|
58
|
-
</script>
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Use `path.getTotalLength()` to calculate the dasharray value dynamically.
|
|
62
|
-
|
|
63
|
-
---
|
|
64
|
-
|
|
65
|
-
## 2. Canvas 2D Procedural Art
|
|
66
|
-
|
|
67
|
-
Animated noise, particle fields, data visualizations — anything that evolves frame-by-frame. Drive it with a GSAP proxy.
|
|
68
|
-
|
|
69
|
-
```html
|
|
70
|
-
<canvas id="proc-canvas" width="1920" height="1080"></canvas>
|
|
71
|
-
<script>
|
|
72
|
-
var canvas = document.getElementById("proc-canvas");
|
|
73
|
-
var ctx = canvas.getContext("2d");
|
|
74
|
-
|
|
75
|
-
function hash(x, y) {
|
|
76
|
-
var n = x * 374761393 + y * 668265263;
|
|
77
|
-
n = (n ^ (n >> 13)) * 1274126177;
|
|
78
|
-
return ((n ^ (n >> 16)) & 0x7fffffff) / 0x7fffffff;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
function drawFrame(t) {
|
|
82
|
-
ctx.fillStyle = "#0a0a0a";
|
|
83
|
-
ctx.fillRect(0, 0, 1920, 1080);
|
|
84
|
-
for (var i = 0; i < 200; i++) {
|
|
85
|
-
var x = hash(i, 0) * 1920;
|
|
86
|
-
var y = hash(i, 1) * 1080;
|
|
87
|
-
var brightness = hash(i, Math.floor(t * 10)) * 255;
|
|
88
|
-
ctx.fillStyle = "rgba(255, 255, 255, " + brightness / 255 + ")";
|
|
89
|
-
ctx.beginPath();
|
|
90
|
-
ctx.arc(x, y, 2, 0, Math.PI * 2);
|
|
91
|
-
ctx.fill();
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
var proxy = { time: 0 };
|
|
96
|
-
tl.to(
|
|
97
|
-
proxy,
|
|
98
|
-
{
|
|
99
|
-
time: 5,
|
|
100
|
-
duration: 5,
|
|
101
|
-
ease: "none",
|
|
102
|
-
onUpdate: function () {
|
|
103
|
-
drawFrame(proxy.time);
|
|
104
|
-
},
|
|
105
|
-
},
|
|
106
|
-
0,
|
|
107
|
-
);
|
|
108
|
-
</script>
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
The `hash()` function is deterministic — same frame renders identically every time.
|
|
112
|
-
|
|
113
|
-
---
|
|
114
|
-
|
|
115
|
-
## 3. CSS 3D Transforms
|
|
116
|
-
|
|
117
|
-
Perspective rotations create depth. Use for product showcases, card flips, architectural reveals.
|
|
118
|
-
|
|
119
|
-
```html
|
|
120
|
-
<div class="stage" style="perspective: 900px;">
|
|
121
|
-
<div class="card-3d" style="transform-style: preserve-3d;">
|
|
122
|
-
<div class="face front">Product</div>
|
|
123
|
-
<div class="face back" style="transform: rotateY(180deg);">Details</div>
|
|
124
|
-
</div>
|
|
125
|
-
</div>
|
|
126
|
-
<script>
|
|
127
|
-
tl.to(".card-3d", { rotationY: 360, rotationX: 15, duration: 1.2, ease: "sine.inOut" }, 0);
|
|
128
|
-
</script>
|
|
129
|
-
```
|
|
130
|
-
|
|
131
|
-
Always set `perspective` on the parent, `transform-style: preserve-3d` on the animated element.
|
|
132
|
-
|
|
133
|
-
---
|
|
134
|
-
|
|
135
|
-
## 4. Per-Word Kinetic Typography
|
|
136
|
-
|
|
137
|
-
Words appear one-by-one, synced to transcript.json timestamps. The core technique for narration-driven videos.
|
|
138
|
-
|
|
139
|
-
```html
|
|
140
|
-
<div class="headline">
|
|
141
|
-
<span class="word w-0">Anything</span>
|
|
142
|
-
<span class="word w-1">a</span>
|
|
143
|
-
<span class="word w-2">browser</span>
|
|
144
|
-
<span class="word w-3">can</span>
|
|
145
|
-
<span class="word w-4">render</span>
|
|
146
|
-
</div>
|
|
147
|
-
<style>
|
|
148
|
-
.word {
|
|
149
|
-
display: inline-block;
|
|
150
|
-
opacity: 0;
|
|
151
|
-
margin: 0 0.12em;
|
|
152
|
-
}
|
|
153
|
-
</style>
|
|
154
|
-
<script>
|
|
155
|
-
// Word onset times from transcript.json (seconds relative to beat start)
|
|
156
|
-
var timings = [0.0, 0.23, 0.28, 0.63, 0.78];
|
|
157
|
-
var slides = [80, 60, 50, 25, 12]; // horizontal slide decay (px)
|
|
158
|
-
|
|
159
|
-
document.querySelectorAll(".word").forEach(function (word, i) {
|
|
160
|
-
tl.from(
|
|
161
|
-
word,
|
|
162
|
-
{
|
|
163
|
-
x: slides[i],
|
|
164
|
-
y: 14,
|
|
165
|
-
opacity: 0,
|
|
166
|
-
duration: 0.35,
|
|
167
|
-
ease: "power2.out",
|
|
168
|
-
},
|
|
169
|
-
timings[i],
|
|
170
|
-
);
|
|
171
|
-
});
|
|
172
|
-
</script>
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
The slide distance DECAYS per word (80→12px) — mimics a camera settling.
|
|
176
|
-
|
|
177
|
-
---
|
|
178
|
-
|
|
179
|
-
## 5. Lottie Animation
|
|
180
|
-
|
|
181
|
-
Vector animations that play inside a composition. Use for logos, character animations, icons.
|
|
182
|
-
|
|
183
|
-
```html
|
|
184
|
-
<div id="anim" class="lottie"></div>
|
|
185
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/bodymovin/5.12.2/lottie.min.js"></script>
|
|
186
|
-
<script>
|
|
187
|
-
window.__hfLottie = window.__hfLottie || [];
|
|
188
|
-
|
|
189
|
-
const anim = lottie.loadAnimation({
|
|
190
|
-
container: document.getElementById("anim"),
|
|
191
|
-
renderer: "svg",
|
|
192
|
-
loop: false,
|
|
193
|
-
autoplay: false,
|
|
194
|
-
path: "capture/assets/lottie/animation-0.json",
|
|
195
|
-
});
|
|
196
|
-
window.__hfLottie.push(anim);
|
|
197
|
-
|
|
198
|
-
gsap.set("#anim", { scale: 0.3, opacity: 0 });
|
|
199
|
-
tl.to("#anim", { scale: 1, opacity: 1, duration: 0.35, ease: "back.out(1.6)" }, 0.2);
|
|
200
|
-
</script>
|
|
201
|
-
```
|
|
202
|
-
|
|
203
|
-
---
|
|
204
|
-
|
|
205
|
-
## 6. Video Compositing
|
|
206
|
-
|
|
207
|
-
Embed real video footage inside compositions. Videos must be `muted` with `playsinline`.
|
|
208
|
-
|
|
209
|
-
```html
|
|
210
|
-
<div class="video-frame" style="width:680px;height:840px;border-radius:16px;overflow:hidden;">
|
|
211
|
-
<video
|
|
212
|
-
id="footage"
|
|
213
|
-
src="capture/assets/videos/clip.mp4"
|
|
214
|
-
muted
|
|
215
|
-
playsinline
|
|
216
|
-
style="width:100%;height:100%;object-fit:cover;"
|
|
217
|
-
></video>
|
|
218
|
-
</div>
|
|
219
|
-
<script>
|
|
220
|
-
// Video playback is controlled by the framework — don't call play() manually
|
|
221
|
-
tl.from(".video-frame", { scale: 0.9, opacity: 0, duration: 0.3, ease: "power2.out" }, 0);
|
|
222
|
-
</script>
|
|
223
|
-
```
|
|
224
|
-
|
|
225
|
-
The HyperFrames runtime handles video seeking and playback.
|
|
226
|
-
|
|
227
|
-
---
|
|
228
|
-
|
|
229
|
-
## 7. Character-by-Character Typing
|
|
230
|
-
|
|
231
|
-
Terminal typing effect using `tl.call()` to update text content character by character.
|
|
232
|
-
|
|
233
|
-
```html
|
|
234
|
-
<div class="terminal-line">
|
|
235
|
-
<span class="prompt">❯</span>
|
|
236
|
-
<span class="typed" id="typed-text"></span>
|
|
237
|
-
<span class="cursor" style="width:11px;height:22px;background:#333;display:inline-block;"></span>
|
|
238
|
-
</div>
|
|
239
|
-
<script>
|
|
240
|
-
var CMD = "npx hyperframes init";
|
|
241
|
-
var typed = document.getElementById("typed-text");
|
|
242
|
-
|
|
243
|
-
// Cursor blinks
|
|
244
|
-
tl.to(".cursor", { opacity: 0, duration: 0.12, yoyo: true, repeat: 20, ease: "steps(1)" }, 0);
|
|
245
|
-
|
|
246
|
-
// Type each character
|
|
247
|
-
for (var i = 0; i < CMD.length; i++) {
|
|
248
|
-
(function (idx) {
|
|
249
|
-
tl.call(
|
|
250
|
-
function () {
|
|
251
|
-
typed.textContent = CMD.substring(0, idx + 1);
|
|
252
|
-
},
|
|
253
|
-
null,
|
|
254
|
-
(idx / CMD.length) * 0.9,
|
|
255
|
-
);
|
|
256
|
-
})(i);
|
|
257
|
-
}
|
|
258
|
-
</script>
|
|
259
|
-
```
|
|
260
|
-
|
|
261
|
-
Use `ease: "steps(1)"` for cursor blink — creates discrete on/off.
|
|
262
|
-
|
|
263
|
-
---
|
|
264
|
-
|
|
265
|
-
## 8. Variable Font Axis Animation
|
|
266
|
-
|
|
267
|
-
Animate font-variation-settings to reshape glyphs in real-time. Works with variable fonts that have axes like optical size (opsz), weight (wght), softness (SOFT).
|
|
268
|
-
|
|
269
|
-
```html
|
|
270
|
-
<style>
|
|
271
|
-
/* Load the captured local variable font — do NOT use Google Fonts @import.
|
|
272
|
-
Replace this placeholder with an @font-face pointing to capture/assets/fonts/. */
|
|
273
|
-
@font-face {
|
|
274
|
-
font-family: "Fraunces";
|
|
275
|
-
src: url("capture/assets/fonts/Fraunces-Variable.woff2") format("woff2");
|
|
276
|
-
font-weight: 100 900;
|
|
277
|
-
font-style: normal;
|
|
278
|
-
font-display: block;
|
|
279
|
-
}
|
|
280
|
-
.wordmark {
|
|
281
|
-
--opsz: 144;
|
|
282
|
-
--wght: 440;
|
|
283
|
-
font-family: "Fraunces", serif;
|
|
284
|
-
font-variation-settings:
|
|
285
|
-
"opsz" var(--opsz),
|
|
286
|
-
"wght" var(--wght);
|
|
287
|
-
font-size: 200px;
|
|
288
|
-
}
|
|
289
|
-
</style>
|
|
290
|
-
<script>
|
|
291
|
-
tl.to(".wordmark", { "--opsz": 72, "--wght": 300, duration: 0.45, ease: "power2.out" }, 0);
|
|
292
|
-
</script>
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
The glyph subtly reshapes as axes animate — optical size adjusts detail, weight changes thickness.
|
|
296
|
-
|
|
297
|
-
---
|
|
298
|
-
|
|
299
|
-
## 9. GSAP MotionPathPlugin
|
|
300
|
-
|
|
301
|
-
Animate an element along an arbitrary SVG path. Use for sliders following curves, particles along trajectories, guided reveals.
|
|
302
|
-
|
|
303
|
-
```html
|
|
304
|
-
<script src="https://cdn.jsdelivr.net/npm/gsap@3.14.2/dist/MotionPathPlugin.min.js"></script>
|
|
305
|
-
<div class="dot" style="width:20px;height:20px;background:#2a8a7c;border-radius:50%;"></div>
|
|
306
|
-
<script>
|
|
307
|
-
gsap.registerPlugin(MotionPathPlugin);
|
|
308
|
-
tl.to(
|
|
309
|
-
".dot",
|
|
310
|
-
{
|
|
311
|
-
motionPath: { path: "M 12 300 C 280 280 520 80 820 50 S 1200 48 1308 38" },
|
|
312
|
-
duration: 1.5,
|
|
313
|
-
ease: "power2.out",
|
|
314
|
-
},
|
|
315
|
-
0,
|
|
316
|
-
);
|
|
317
|
-
</script>
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
---
|
|
321
|
-
|
|
322
|
-
## 10. Velocity-Matched Transitions
|
|
323
|
-
|
|
324
|
-
Exit one beat and enter the next with matched velocities — creates perceived continuous motion.
|
|
325
|
-
|
|
326
|
-
```javascript
|
|
327
|
-
// EXIT (in outgoing composition): accelerating with blur
|
|
328
|
-
tl.to(
|
|
329
|
-
".content",
|
|
330
|
-
{
|
|
331
|
-
y: -150,
|
|
332
|
-
filter: "blur(30px)",
|
|
333
|
-
opacity: 0,
|
|
334
|
-
duration: 0.33,
|
|
335
|
-
ease: "power2.in", // accelerates
|
|
336
|
-
},
|
|
337
|
-
parseFloat(root.dataset.duration) - 0.33, // start exit 0.33s before beat ends
|
|
338
|
-
);
|
|
339
|
-
|
|
340
|
-
// ENTRY (in incoming composition): decelerating from blur
|
|
341
|
-
gsap.set(".content", { y: 150, filter: "blur(30px)" });
|
|
342
|
-
tl.to(
|
|
343
|
-
".content",
|
|
344
|
-
{
|
|
345
|
-
y: 0,
|
|
346
|
-
filter: "blur(0px)",
|
|
347
|
-
duration: 1.0,
|
|
348
|
-
ease: "power2.out", // decelerates
|
|
349
|
-
},
|
|
350
|
-
0,
|
|
351
|
-
);
|
|
352
|
-
```
|
|
353
|
-
|
|
354
|
-
The fastest point of both curves meets at the cut — the viewer perceives smooth camera motion. Match ease families: `.in` for exits, `.out` for entries.
|
|
355
|
-
|
|
356
|
-
---
|
|
357
|
-
|
|
358
|
-
## 11. Audio-Reactive Animation
|
|
359
|
-
|
|
360
|
-
Drive any GSAP-tweenable property from the playing audio. Bass pulses a logo on kick drums. Treble glows a CTA on cymbals. Amplitude breathes a background during quiet phrases. The result: motion that feels locked to the track in a way pre-authored tweens never can.
|
|
361
|
-
|
|
362
|
-
**When to use:** Any video with music or dramatic narration — brand reels, product launches, hype edits. Skip for calm/tutorial pacing.
|
|
363
|
-
|
|
364
|
-
**How it works:** Pre-extract audio frequency bands into a JSON file, then sample per-frame via `tl.call()`:
|
|
365
|
-
|
|
366
|
-
```js
|
|
367
|
-
// audio-data.json: { fps: 30, totalFrames: 900, frames: [{ bands: [0.82, 0.45, 0.31, ...] }, ...] }
|
|
368
|
-
for (var f = 0; f < AUDIO_DATA.totalFrames; f++) {
|
|
369
|
-
tl.call(
|
|
370
|
-
(function (frame) {
|
|
371
|
-
return function () {
|
|
372
|
-
var bass = frame.bands[0]; // 0–1
|
|
373
|
-
var treble = frame.bands[13];
|
|
374
|
-
gsap.set(".logo", { scale: 1 + bass * 0.04 }); // 3–4% pulse on bass
|
|
375
|
-
gsap.set(".cta", { filter: `drop-shadow(0 0 ${treble * 24}px #00C3FF)` });
|
|
376
|
-
};
|
|
377
|
-
})(AUDIO_DATA.frames[f]),
|
|
378
|
-
[],
|
|
379
|
-
f / AUDIO_DATA.fps,
|
|
380
|
-
);
|
|
381
|
-
}
|
|
382
|
-
```
|
|
383
|
-
|
|
384
|
-
Per-frame sampling is required — a single tween will not react. Use the extract script:
|
|
385
|
-
|
|
386
|
-
```bash
|
|
387
|
-
python3 skills/gsap/scripts/extract-audio-data.py narration.wav --fps 30 --bands 16 -o audio-data.json
|
|
388
|
-
```
|
|
389
|
-
|
|
390
|
-
Keep text/logo intensity subtle (≤5% scale, ≤30% glow) — audio-reactive motion on tiny elements reads as jitter. Bigger backgrounds can push to 10–30%.
|
|
391
|
-
|
|
392
|
-
**Never do:** equalizer bars, spectrum analyzers, waveform displays, strobing, rainbow color cycling. The audio provides _timing and intensity_; the visual vocabulary still comes from the brand. See `skills/hyperframes/references/audio-reactive.md` for the full API and anti-patterns.
|
|
393
|
-
|
|
394
|
-
---
|
|
395
|
-
|
|
396
|
-
## 12. Clip-Path Reveal Masks
|
|
397
|
-
|
|
398
|
-
A fixed window that content slides through — text or images enter from one side and are clipped by an invisible boundary. Different from SVG path drawing: the mask is static, the content moves.
|
|
399
|
-
|
|
400
|
-
```html
|
|
401
|
-
<div id="reveal-mask">
|
|
402
|
-
<div id="reveal-content">Your headline text here</div>
|
|
403
|
-
</div>
|
|
404
|
-
<style>
|
|
405
|
-
#reveal-mask {
|
|
406
|
-
position: absolute;
|
|
407
|
-
inset: 0;
|
|
408
|
-
clip-path: inset(0 200px 0 0); /* clips 200px from right */
|
|
409
|
-
display: flex;
|
|
410
|
-
align-items: center;
|
|
411
|
-
justify-content: center;
|
|
412
|
-
}
|
|
413
|
-
#reveal-content {
|
|
414
|
-
font-size: 108px;
|
|
415
|
-
white-space: nowrap;
|
|
416
|
-
}
|
|
417
|
-
</style>
|
|
418
|
-
<script>
|
|
419
|
-
// Content starts offscreen right, slides left through the mask window
|
|
420
|
-
gsap.set("#reveal-content", { x: 400, opacity: 0 });
|
|
421
|
-
tl.to("#reveal-content", { x: 0, opacity: 1, duration: 1, ease: "power2.out" }, 0);
|
|
422
|
-
</script>
|
|
423
|
-
```
|
|
424
|
-
|
|
425
|
-
Variations: `clip-path: circle(0% at 50% 50%)` → `circle(100%)` for iris reveals. `clip-path: polygon(...)` for custom shapes.
|
|
426
|
-
|
|
427
|
-
---
|
|
428
|
-
|
|
429
|
-
## 13. WebGL Fragment Shader Art
|
|
430
|
-
|
|
431
|
-
Full GPU generative backgrounds — domain-warped FBM noise, cosine palette coloring, iridescent organic patterns. Far richer than Canvas 2D.
|
|
432
|
-
|
|
433
|
-
```html
|
|
434
|
-
<canvas id="shader-bg" width="1920" height="1080"></canvas>
|
|
435
|
-
<script>
|
|
436
|
-
var canvas = document.getElementById("shader-bg");
|
|
437
|
-
var gl = canvas.getContext("webgl");
|
|
438
|
-
if (!gl) {
|
|
439
|
-
/* fallback to gradient */
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
var fsrc = `
|
|
443
|
-
precision mediump float;
|
|
444
|
-
varying vec2 v_uv;
|
|
445
|
-
uniform float u_time;
|
|
446
|
-
uniform vec2 u_res;
|
|
447
|
-
|
|
448
|
-
float hash(vec2 p) { return fract(sin(dot(p, vec2(127.1, 311.7))) * 43758.5453); }
|
|
449
|
-
float noise(vec2 p) {
|
|
450
|
-
vec2 i = floor(p), f = fract(p);
|
|
451
|
-
f = f * f * (3.0 - 2.0 * f);
|
|
452
|
-
return mix(mix(hash(i), hash(i+vec2(1,0)), f.x),
|
|
453
|
-
mix(hash(i+vec2(0,1)), hash(i+vec2(1,1)), f.x), f.y);
|
|
454
|
-
}
|
|
455
|
-
float fbm(vec2 p) {
|
|
456
|
-
float v = 0.0, a = 0.5;
|
|
457
|
-
mat2 R = mat2(0.8, 0.6, -0.6, 0.8);
|
|
458
|
-
for (int i = 0; i < 5; i++) { v += a*noise(p); p = R*p*2.02; a *= 0.5; }
|
|
459
|
-
return v;
|
|
460
|
-
}
|
|
461
|
-
vec3 palette(float t) {
|
|
462
|
-
return vec3(0.5)+vec3(0.5)*cos(6.28318*(vec3(1)*t+vec3(0.0,0.33,0.67)));
|
|
463
|
-
}
|
|
464
|
-
void main() {
|
|
465
|
-
vec2 uv = v_uv; uv.x *= u_res.x/u_res.y;
|
|
466
|
-
float t = u_time * 0.4;
|
|
467
|
-
vec2 q = vec2(fbm(uv*3.0+t*0.3), fbm(uv*3.0+vec2(5.2,1.3)+t*0.2));
|
|
468
|
-
vec2 r = vec2(fbm(uv*3.0+q*4.0+vec2(1.7,9.2)+t*0.15), fbm(uv*3.0+q*4.0+vec2(8.3,2.8)+t*0.1));
|
|
469
|
-
float n = fbm(uv*3.0+r*2.0);
|
|
470
|
-
vec3 col = palette(n*2.0+t*0.2);
|
|
471
|
-
col = mix(col, palette(length(q)*3.0+t*0.1), 0.4);
|
|
472
|
-
col *= 0.7+0.3*n;
|
|
473
|
-
float vig = 1.0-0.4*length(v_uv-0.5);
|
|
474
|
-
gl_FragColor = vec4(col*vig, 1.0);
|
|
475
|
-
}
|
|
476
|
-
`;
|
|
477
|
-
|
|
478
|
-
// Compile, link, set up fullscreen quad, then render via GSAP proxy:
|
|
479
|
-
var proxy = { time: 0.5 };
|
|
480
|
-
tl.to(
|
|
481
|
-
proxy,
|
|
482
|
-
{
|
|
483
|
-
time: 5,
|
|
484
|
-
duration: BEAT_DUR,
|
|
485
|
-
ease: "none",
|
|
486
|
-
onUpdate: function () {
|
|
487
|
-
gl.uniform1f(uTime, proxy.time);
|
|
488
|
-
gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);
|
|
489
|
-
},
|
|
490
|
-
},
|
|
491
|
-
0,
|
|
492
|
-
);
|
|
493
|
-
</script>
|
|
494
|
-
```
|
|
495
|
-
|
|
496
|
-
Always include a Canvas 2D gradient fallback for environments without WebGL.
|
|
497
|
-
|
|
498
|
-
---
|
|
499
|
-
|
|
500
|
-
## Easing Vocabulary
|
|
501
|
-
|
|
502
|
-
GSAP offers a deep easing library. Every composition should use at least 3 different easings — using `power2.out` for everything produces flat, monotonous motion. Think of easings as tone of voice: a video that only whispers is boring; one that varies between whisper, normal, and punch is engaging.
|
|
503
|
-
|
|
504
|
-
**The full palette** (each family has `.in`, `.out`, `.inOut` variants):
|
|
505
|
-
|
|
506
|
-
| Family | Character | Typical use |
|
|
507
|
-
| -------------------- | ---------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
|
508
|
-
| `power1`–`power4` | Gentle (1) to aggressive (4) acceleration curves | General purpose. power2 is the workhorse, power4 for dramatic snaps |
|
|
509
|
-
| `back(N)` | Overshoot then settle. N controls how far past the target (1=subtle, 4=wild) | Logo reveals, badge pops, card entrances. `back.out(2.5)` for playful, `back.out(1.2)` for elegant |
|
|
510
|
-
| `elastic(amp, freq)` | Spring bounce. amp=magnitude, freq=oscillation speed | Panel scatter, energetic drops, fun reveals |
|
|
511
|
-
| `bounce` | Ball-drop bouncing | Physical interactions, icons landing, score counters |
|
|
512
|
-
| `expo` | Extreme acceleration curve (much steeper than power4) | Premium/luxury reveals, dramatic entrances |
|
|
513
|
-
| `sine` | Smooth, organic, no hard edges | Ambient float, breathing, Ken Burns, anything that loops. `.inOut` for yoyo motion |
|
|
514
|
-
| `circ` | Circular acceleration (starts very fast, ends very gentle or vice versa) | Camera moves, scene transitions, orbital motion |
|
|
515
|
-
| `steps(N)` | Discrete N-step jumps, no interpolation | Typing effects, cursor blink, counter ticks, retro/digital aesthetics |
|
|
516
|
-
|
|
517
|
-
**Mood mapping:** Match easing character to the beat's emotional content. Smooth/organic easings (`sine`, `power1`) feel contemplative and drifting. Aggressive deceleration (`power4.out`, `expo.out`) feels snappy and confident. Spring overshoot (`back.out`) feels bouncy and physical. The storyboard's mood description should guide which character fits — not a formula.
|
|
518
|
-
|
|
519
|
-
---
|
|
520
|
-
|
|
521
|
-
## Choosing techniques
|
|
522
|
-
|
|
523
|
-
Don't match techniques to video type on autopilot — match them to the **concept of the specific beat**. Ask: what visual treatment makes this exact idea land? A beat about speed needs motion that communicates speed; a beat about precision needs geometry and structure; a beat about warmth needs texture and organic drift.
|
|
524
|
-
|
|
525
|
-
Read the storyboard beat's concept and mood, then scan this list for techniques whose _visual character_ serves that concept. Any technique can appear in any video type — the question is whether it earns its place in this beat.
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
# Text Effects — Reference
|
|
2
|
-
|
|
3
|
-
For deterministic text-animation specs (e.g., `typewriter` at exact `240ms / 46ms stagger / steps(1, end) easing`), this skill defers to the separate **`animate-text`** skill maintained by Pixel Point at [github.com/pixel-point/animate-text](https://github.com/pixel-point/animate-text). It provides a catalog of 24 named text effects with portable contracts and per-library implementation recipes (GSAP, Anime.js, WAAPI).
|
|
4
|
-
|
|
5
|
-
**We do NOT ship the catalog inside this repo.** Pixel Point's `animate-text` is the source of truth; vendoring its files here would violate the upstream's licensing (no explicit license declared upstream as of this writing). Loading the skill separately keeps the legal picture clean while giving you the same catalog.
|
|
6
|
-
|
|
7
|
-
## How to use it
|
|
8
|
-
|
|
9
|
-
When a beat needs a deterministic text animation, load the upstream skill alongside this one:
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
# In your project root, install the upstream skill into .agents/skills/
|
|
13
|
-
npx skills add pixel-point/animate-text
|
|
14
|
-
```
|
|
15
|
-
|
|
16
|
-
Or in Claude Code / a skill-aware agent runtime, the skill is invoked by name:
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
/animate-text
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Once installed, the specs live at:
|
|
23
|
-
|
|
24
|
-
```
|
|
25
|
-
.agents/skills/animate-text/assets/effects/<id>.json # per-library implementation recipe
|
|
26
|
-
.agents/skills/animate-text/assets/specs/<id>.json # portable motion contract
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Sub-agents reading those files get exact GSAP timings, easing strings, DOM split rules, and stagger algorithms — no creative invention needed.
|
|
30
|
-
|
|
31
|
-
## When you don't need the upstream skill
|
|
32
|
-
|
|
33
|
-
If a beat's text animation is simple enough to describe in prose ("headline fades up word-by-word, 80ms stagger"), implement it inline using the GSAP knowledge already in this skill ([motion-principles.md](motion-principles.md), [beat-direction.md](beat-direction.md), [techniques.md](techniques.md) — see entry #4 "Per-Word Kinetic Typography"). The upstream catalog is most valuable when:
|
|
34
|
-
|
|
35
|
-
- You want a specific NAMED effect across multiple beats (so they feel like one design system, not one-offs)
|
|
36
|
-
- You're choosing between several similar effects (typewriter vs per-character-rise vs bottom-up-letters) and want to see all 24 in one place
|
|
37
|
-
- You need layout-aware effects (`kinetic-center-build`, `short-slide-right`, `short-slide-down`) where parameters alone aren't enough — those ship with custom layout algorithms
|
|
38
|
-
|
|
39
|
-
## Effect names — vocabulary (do NOT use this as the implementation source)
|
|
40
|
-
|
|
41
|
-
For convenience while writing storyboards: the upstream skill provides 24 effects. Their IDs are listed here so you can name them in `STORYBOARD.md` even before loading the upstream skill. **The implementation specs are in the upstream skill, not here.**
|
|
42
|
-
|
|
43
|
-
- **Per-character (7):** soft-blur-in, per-character-rise, typewriter, bottom-up-letters, top-down-letters, stagger-from-center, stagger-from-edges
|
|
44
|
-
- **Per-word (8):** per-word-crossfade, spring-scale-in, shared-axis-y, blur-out-up, kinetic-center-build, short-slide-right, short-slide-down, depth-parallax-words
|
|
45
|
-
- **Per-line (2):** mask-reveal-up, line-by-line-slide
|
|
46
|
-
- **Whole element (7):** micro-scale-fade, shimmer-sweep, fade-through, shared-axis-z, scale-down-fade, focus-blur-resolve, shared-axis-x
|
|
47
|
-
|
|
48
|
-
For descriptions, durations, easing curves, and the per-library recipes: load `/animate-text` and read its own catalog page.
|
|
49
|
-
|
|
50
|
-
## In the storyboard
|
|
51
|
-
|
|
52
|
-
Every text element in every beat can name an effect by ID, e.g.:
|
|
53
|
-
|
|
54
|
-
```markdown
|
|
55
|
-
**Text Animations:**
|
|
56
|
-
|
|
57
|
-
- Main headline: `kinetic-center-build`
|
|
58
|
-
- Eyebrow label: `soft-blur-in`
|
|
59
|
-
- Body copy 3 lines: `mask-reveal-up`
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
Sub-agents implementing the beat will load `/animate-text` if it's not already loaded, then read the spec for each named effect from the upstream skill's files.
|
|
63
|
-
|
|
64
|
-
If the upstream skill isn't available (offline build, network restrictions, agent runtime that doesn't support skill loading), sub-agents fall back to implementing the effect from the description alone — using GSAP knowledge plus the effect ID as a description of intent (e.g., "typewriter" = per-character stepped reveal with no interpolation).
|