dreative 0.5.1 → 0.5.2
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/README.md +49 -27
- package/dist/cli/audit.js +206 -0
- package/dist/cli/audit.test.js +79 -0
- package/dist/cli/docsCheck.js +163 -0
- package/dist/cli/docsCheck.test.js +8 -0
- package/dist/cli/index.js +45 -9
- package/dist/server/preview.js +73 -73
- package/dist/server/store.js +11 -0
- package/dist/shared/artifacts.js +162 -0
- package/dist/shared/design.js +42 -22
- package/dist/shared/ruleSystem.js +130 -0
- package/dist/shared/ruleSystem.test.js +187 -0
- package/dist/shared/skillSystem.js +173 -0
- package/dist/shared/skillSystem.test.js +110 -0
- package/dist/ui/assets/{index--vztc_MR.js → index-CKwmbx2j.js} +13 -13
- package/dist/ui/index.html +12 -12
- package/package.json +5 -3
- package/skill/dreative/DESIGN.md +121 -93
- package/skill/dreative/PLAN.md +229 -92
- package/skill/dreative/SKILL.md +218 -137
- package/skill/dreative/frameworks/nextjs.md +13 -0
- package/skill/dreative/frameworks/react-vite.md +12 -0
- package/skill/dreative/frameworks/styling.md +14 -0
- package/skill/dreative/frameworks/sveltekit.md +10 -0
- package/skill/dreative/frameworks/vue-nuxt.md +12 -0
- package/skill/dreative/recipes/3d-recipes.md +44 -0
- package/skill/dreative/recipes/cinematic-recipes.md +19 -0
- package/skill/dreative/recipes/immersive-recipes.md +18 -0
- package/skill/dreative/recipes/media-recipes.md +60 -0
- package/skill/dreative/recipes/motion-recipes.md +44 -0
- package/skill/dreative/references/ARTIFACTS.md +180 -0
- package/skill/dreative/references/REFLEX_FONTS.json +44 -0
- package/skill/dreative/references/RULES.json +186 -0
- package/skill/dreative/references/SKILL_CONTRACT.md +30 -0
- package/skill/dreative/references/TIERS.md +42 -0
- package/skill/dreative/schemas/plan.schema.json +241 -0
- package/skill/dreative/schemas/verify.schema.json +61 -0
- package/skill/dreative/skills/3d.md +94 -267
- package/skill/dreative/skills/cinematic.md +56 -232
- package/skill/dreative/skills/experimental.md +108 -95
- package/skill/dreative/skills/immersive.md +61 -223
- package/skill/dreative/skills/interaction.md +9 -1
- package/skill/dreative/skills/media.md +135 -564
- package/skill/dreative/skills/mobile.md +128 -117
- package/skill/dreative/skills/motion.md +89 -256
- package/skill/dreative/skills/refined.md +116 -102
- package/skill/dreative/skills/ux.md +155 -144
- package/dist/server/ai.js +0 -177
|
@@ -1,564 +1,135 @@
|
|
|
1
|
-
# Dreative Specialist Skill — Media as Motion Material
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
together reads as choreography; landing separately reads as two plugins.
|
|
137
|
-
- **One treatment vocabulary per page.** Pick 1-2 media treatments and stamp
|
|
138
|
-
them consistently (all work cards hover-wake; all section images curtain-
|
|
139
|
-
reveal). Five different reveal styles = assembled, not designed.
|
|
140
|
-
- **Invent, don't pick.** §2/§3 are springboards, not a menu — the signature
|
|
141
|
-
media treatment should be COMPOSED for this brand and this prompt using the
|
|
142
|
-
grammar in §2.5 (a torn-paper archive scrolls differently than a liquid
|
|
143
|
-
fashion film). Stock-vocabulary media reads as template exactly like stock
|
|
144
|
-
layouts do; if the user's prompt describes an effect ("images tear apart on
|
|
145
|
-
scroll"), build THAT effect for real, at the tier it needs.
|
|
146
|
-
- **Real assets outrank generated ones** (DESIGN.md §7). Generated media fills
|
|
147
|
-
gaps and creates atmosphere; it never replaces the client's product shots.
|
|
148
|
-
|
|
149
|
-
## 1. Production pipeline (generate → grade → compress)
|
|
150
|
-
|
|
151
|
-
When the plan calls for generated media, produce it BEFORE section code
|
|
152
|
-
(PLAN.md §4) and produce it correctly:
|
|
153
|
-
|
|
154
|
-
- **Prompt for the world, grade for the page.** Prompt the brand's physical
|
|
155
|
-
subject (DESIGN.md §7) PLUS the page's light: temperature ("warm tungsten
|
|
156
|
-
side-light", "cool overcast daylight"), palette anchors ("deep green shadows,
|
|
157
|
-
bone highlights"), and grain/mood. Every asset on a page shares ONE lighting
|
|
158
|
-
logic — mismatched light is the #1 generated-media tell.
|
|
159
|
-
- **Exact aspect ratios** from the blueprint (16:9 hero, 4:5 cards, 1:1
|
|
160
|
-
thumbnails, 21:9 banners). Never generate square and crop-hope.
|
|
161
|
-
- **Video loops**: 5-10s, prompt explicitly for seamlessness ("seamless loop,
|
|
162
|
-
continuous motion, no scene change") and slow motion content (drift, steam,
|
|
163
|
-
fabric, water — fast action never loops cleanly). Generate or extract a
|
|
164
|
-
**poster frame** for every video (first frame, same grade).
|
|
165
|
-
- **Image sequences** for scroll scrubs: 40-80 frames of one continuous
|
|
166
|
-
transformation (assemble/rotate/morph). Image-to-video tools can produce
|
|
167
|
-
these from a single generated still; export frames with ffmpeg
|
|
168
|
-
(`ffmpeg -i loop.mp4 -vf fps=12,scale=1280:-1 frames/f_%03d.webp`).
|
|
169
|
-
- **Compress before committing**: images → WebP/AVIF at the largest displayed
|
|
170
|
-
size ×2 max; video → H.264 + AV1 sources, CRF ~28-32, no audio track, ≤ 2-4MB
|
|
171
|
-
per loop (`ffmpeg -i in.mp4 -an -c:v libx264 -crf 30 -movflags +faststart`).
|
|
172
|
-
A 40MB hero loop fails the plan even if it's beautiful.
|
|
173
|
-
- Textures too: grain tiles, masks, mattes, displacement maps — generate them
|
|
174
|
-
instead of hand-rolling SVG (which is banned, DESIGN.md §7).
|
|
175
|
-
- **Asset manifest (`.dreative/assets.json`) — generation is expensive; never
|
|
176
|
-
pay twice.** Before generating anything, read the manifest; an entry whose
|
|
177
|
-
prompt/aspect/grade matches the need means REUSE the file, don't regenerate.
|
|
178
|
-
After each generation+edit, append one entry:
|
|
179
|
-
`{ "file": "assets/hero-loop.mp4", "kind": "video-loop", "prompt": "<the
|
|
180
|
-
exact generation prompt>", "aspect": "16:9", "grade": "warm tungsten, deep
|
|
181
|
-
green shadows", "poster": "assets/hero-poster.webp", "bytes": 2400000 }`.
|
|
182
|
-
A re-run, a mockup→build transition, or a resumed session regenerates only
|
|
183
|
-
what the manifest doesn't already have.
|
|
184
|
-
|
|
185
|
-
## 1.5 Custom props (isolated compositional elements)
|
|
186
|
-
|
|
187
|
-
Distinct from hero/gallery media (§1-2, which fill a frame): a **prop** is a
|
|
188
|
-
small, isolated object — a single coffee bean, a steam wisp, a leaf, a bottle,
|
|
189
|
-
an icon-scale object — used as scattered COMPOSITION around content, not as
|
|
190
|
-
the content itself. Props are what make a page feel art-directed rather than
|
|
191
|
-
stocked with rectangles; they're cheap to generate/build and reused as a
|
|
192
|
-
recurring motif across sections (the visual equivalent of a signature element,
|
|
193
|
-
motion.md's terms).
|
|
194
|
-
|
|
195
|
-
Two flavors — pick per section from the blueprint, they can mix on one page:
|
|
196
|
-
|
|
197
|
-
- **Cutout image props**: with no image-gen tool, source instead of generate —
|
|
198
|
-
a verified real photo of the subject, matted to transparency (rembg / sharp /
|
|
199
|
-
ImageMagick if available); if no photo source and no matting path exists, the
|
|
200
|
-
prop is cut, never approximated with coded organic geometry (3d.md §3 rung 4).
|
|
201
|
-
When generating: generate on a transparent background — prompt
|
|
202
|
-
explicitly ("isolated on pure transparent background, studio product
|
|
203
|
-
lighting, no backdrop, no shadow baked in") and REQUEST alpha-channel PNG
|
|
204
|
-
output. **Verify the alpha is real**, not a white/checkerboard fill the
|
|
205
|
-
model painted in: sample a corner pixel programmatically or view at 100%
|
|
206
|
-
over a colored backdrop — a prop with a faint white halo is a failed
|
|
207
|
-
generation, regenerate or matte it out (rembg/similar if available). Add a
|
|
208
|
-
drop shadow / contact shadow yourself in CSS (`filter: drop-shadow(...)`),
|
|
209
|
-
never bake it into the generation — a baked shadow breaks when the prop
|
|
210
|
-
moves or the section behind it changes color.
|
|
211
|
-
- **3D props**: when a prop lives inside a WebGL scene, the DEFAULT is still a
|
|
212
|
-
cutout image — on a billboard plane per 3d.md §3 rung 2 (alpha-tested plane,
|
|
213
|
-
parallax + damped rotation + contact shadow), which is photoreal by
|
|
214
|
-
construction. Coded geometry is reserved for ABSTRACT prop shapes (shards,
|
|
215
|
-
ribbons, orbs-as-design-objects) and must carry a real textured material per
|
|
216
|
-
`experimental.md` §1 (generated albedo + bump/roughness map, rim light,
|
|
217
|
-
environment reflection) — never model an organic real object (bean, leaf,
|
|
218
|
-
bottle…) from primitives; 3d.md §3 bans it. Either flavor is reusable: the
|
|
219
|
-
SAME prop instanced multiple times (different scale/rotation) reads as a
|
|
220
|
-
coherent motif, not repetition.
|
|
221
|
-
|
|
222
|
-
Placement and behavior:
|
|
223
|
-
|
|
224
|
-
- Compose as a **floating layer** (§2's floating-media technique) around
|
|
225
|
-
content: corners, margins, trailing a section's edge — never covering the
|
|
226
|
-
content's readable area. 3-6 instances per page is a motif; more reads as
|
|
227
|
-
clutter.
|
|
228
|
-
- Give props real behavior, same floors as any media (§0): idle drift/rotate,
|
|
229
|
-
parallax depth differential, and at least one response (cursor-follow with
|
|
230
|
-
lag, scroll-linked rotation, hover nudge, scatter-and-reform on scroll
|
|
231
|
-
velocity). A prop that just sits pinned in a corner is decoration nobody
|
|
232
|
-
asked for; a prop that visibly reacts is what sells the "crafted" feel.
|
|
233
|
-
- One prop VOCABULARY per page — pick one subject family (all beans/leaves/
|
|
234
|
-
steam, not a random mix of unrelated objects) and one behavior language, the
|
|
235
|
-
same discipline as §0's "one treatment vocabulary" rule.
|
|
236
|
-
- Record each in the asset manifest (§1) with `"kind": "prop-image"` or
|
|
237
|
-
`"kind": "prop-3d"` — props get reused across sections, never regenerated
|
|
238
|
-
per-section.
|
|
239
|
-
|
|
240
|
-
## 2. DOM-tier treatments (no WebGL — the budget vocabulary)
|
|
241
|
-
|
|
242
|
-
80% of the effect at 5% of the cost; the right tier below dial 8 or without a
|
|
243
|
-
canvas already on the page. All honor the floors in §5.
|
|
244
|
-
|
|
245
|
-
- **Curtain / inset reveal**: media enters behind a wipe —
|
|
246
|
-
`clip-path: inset(100% 0 0 0) → inset(0)` (or 2-4 panel slides), 900ms
|
|
247
|
-
expo-out, triggered in-view once, synced to the headline's line-mask.
|
|
248
|
-
- **Hover-woken loop**: still poster crossfades to its video loop on
|
|
249
|
-
hover/focus (240ms), `video.play()` on enter, pause + reset to poster on
|
|
250
|
-
leave. The "living thumbnail" for work/product cards. Preload `metadata`
|
|
251
|
-
only; play() only after the crossfade starts.
|
|
252
|
-
- **Mask-shaped video**: the loop plays inside display type
|
|
253
|
-
(`background-clip: text` on 10vw+ headlines), an arch/circle `clip-path`, or
|
|
254
|
-
the brand mark (SVG mask). Video becomes identity, not a rectangle. One per
|
|
255
|
-
page.
|
|
256
|
-
- **Floating media**: 3-5 images hovering in depth — slow damped drift
|
|
257
|
-
(±6-10px, 4-8s loops, each phase-offset), parallax differential by depth
|
|
258
|
-
layer, soft tinted contact shadow. The "paper sheets in space" look, pure CSS
|
|
259
|
-
+ one IntersectionObserver.
|
|
260
|
-
- **Ken-burns**: slow scale 1.0→1.06 over 12-20s inside a fixed frame,
|
|
261
|
-
alternate direction per instance. The refined register's entire motion budget
|
|
262
|
-
for imagery (refined.md).
|
|
263
|
-
- **Pixel/dither swap**: stepped `image-rendering: pixelated` downscale swap
|
|
264
|
-
(24px mosaic → full res in 4-6 steps) on scroll progress or hover. Digital-
|
|
265
|
-
craft registers.
|
|
266
|
-
- **Inner-zoom parallax**: image at 115% height inside `overflow-hidden` frame,
|
|
267
|
-
`object-position` or translateY driven by scroll (-8%→8%). Media moves, frame
|
|
268
|
-
doesn't — never parallax the frame itself past text.
|
|
269
|
-
- **Scroll-scrubbed `<canvas>` sequence**: preload frames (§1), draw the frame
|
|
270
|
-
for the current damped scroll progress; sticky wrapper ≤ 2.5 viewports
|
|
271
|
-
(motion.md §7's scrub showcase). No WebGL needed.
|
|
272
|
-
|
|
273
|
-
## 2.5 The invention grammar (compose the signature treatment)
|
|
274
|
-
|
|
275
|
-
Every media effect — including any the user describes in their own words — is
|
|
276
|
-
three choices multiplied together. Compose deliberately:
|
|
277
|
-
|
|
278
|
-
- **PROPERTY** (what changes): position/scale · opacity · clip/mask SHAPE
|
|
279
|
-
(inset, circle, arch, brand mark, jagged polygon) · slices/fragments (the
|
|
280
|
-
media cut into strips, tiles, or shards that move independently) · UV
|
|
281
|
-
distortion (WebGL: ripple, stretch, melt, swirl) · resolution (mosaic →
|
|
282
|
-
sharp) · color channels (RGB split, duotone → full color) · blend/exposure
|
|
283
|
-
(media develops like a photo print).
|
|
284
|
-
- **DRIVER** (what pushes it): scroll progress (scrubbed) · scroll VELOCITY
|
|
285
|
-
(agitation that decays) · in-view trigger (one-shot) · hover/focus ·
|
|
286
|
-
cursor position within the element (directional!) · drag · hold · time.
|
|
287
|
-
- **SHAPE OF PROGRESSION** (how it travels across the media): uniform ·
|
|
288
|
-
directional sweep (left→right, top→bottom) · radial from a point (often the
|
|
289
|
-
cursor's entry point) · per-slice stagger · noise-mask (organic, torn) ·
|
|
290
|
-
along the brand mark's silhouette.
|
|
291
|
-
|
|
292
|
-
The user's prompt usually fixes one or two axes; you compose the rest from the
|
|
293
|
-
brand's world. "Tearing" = slices + jagged noise-mask edges, driven by scroll.
|
|
294
|
-
"Video fades from left to right on hover" = opacity/mask, hover-driven,
|
|
295
|
-
directional sweep — a gradient `mask-image` whose position animates, 400ms,
|
|
296
|
-
from the edge the cursor entered. Name the composed treatment in the plan
|
|
297
|
-
blueprint like a signature element, and stamp it consistently (§0).
|
|
298
|
-
|
|
299
|
-
**Worked exotics (copy the construction, not the skin):**
|
|
300
|
-
|
|
301
|
-
- **Paper tear on scroll**: image duplicated into 2-3 layers, each clipped by
|
|
302
|
-
a jagged `clip-path` polygon sharing torn edges; scroll progress translates/
|
|
303
|
-
rotates the pieces apart (±2-6°) with a hairline of background showing
|
|
304
|
-
through; WebGL version displaces UV along a noise seam. Archive/editorial/
|
|
305
|
-
punk registers.
|
|
306
|
-
- **Strip-slice reveal**: media as 5-9 vertical strips (repeated
|
|
307
|
-
`background-image` with offset `background-position`, or plane-per-strip);
|
|
308
|
-
strips slide in staggered from alternating directions, or shear on scroll
|
|
309
|
-
velocity. The classic award-site gallery entrance.
|
|
310
|
-
- **Directional hover wipe**: detect the pointer's entry edge (compare
|
|
311
|
-
enter coordinates to bounds); the reveal (opacity mask, color→duotone,
|
|
312
|
-
still→video crossfade) sweeps FROM that edge. Feels alive because it
|
|
313
|
-
answers the gesture's direction.
|
|
314
|
-
- **Cursor-torch reveal**: media sits dimmed/blurred/halftoned; a radial mask
|
|
315
|
-
tracking the (damped) cursor reveals it sharp and graded — the flashlight
|
|
316
|
-
over an archive. Pair with a "drag to explore" label.
|
|
317
|
-
- **Melt/liquid exit**: on section leave or route change, UV y-displacement
|
|
318
|
-
grows by a noise column pattern — the image drips out of frame (WebGL), or
|
|
319
|
-
budget version: per-strip translateY with eased random offsets.
|
|
320
|
-
- **Shatter/scatter**: media as an instanced tile grid (WebGL) that explodes
|
|
321
|
-
along scroll velocity and reassembles at rest — the §3 plane system with a
|
|
322
|
-
per-instance offset uniform; cap tiles ≤ 400.
|
|
323
|
-
- **Image tornado / vortex**: 8-20 image cards on a helical path (WebGL
|
|
324
|
-
planes, or DOM: `rotateY` + translate on a cylinder via per-card
|
|
325
|
-
`--angle`), scroll progress spins and tightens/loosens the helix; cards
|
|
326
|
-
face the camera (billboard) or shear with velocity. Entry/exit: cards fly
|
|
327
|
-
in from scatter, settle into the vortex, then one card breaks out and
|
|
328
|
-
expands into the next section's hero. Gallery/archive/portfolio registers;
|
|
329
|
-
damp the spin (never raw-set), cap DPR, poster fallback.
|
|
330
|
-
- **Disintegration on scroll/click**: the image dissolves into particles that
|
|
331
|
-
drift away along scroll direction — WebGL: draw the texture as a point grid
|
|
332
|
-
(one point per NxN texel block, ≤ 10k), scroll/click drives `uProgress`
|
|
333
|
-
which displaces points along noise + directional velocity while alpha
|
|
334
|
-
fades; reverse the uniform to reassemble. Budget DOM version: the image
|
|
335
|
-
sliced into a coarse tile grid, tiles translate/rotate/fade with staggered
|
|
336
|
-
randomized offsets. Click-to-destroy variants pair with a rebuild on
|
|
337
|
-
scroll-back — destruction must be reversible, content is never lost.
|
|
338
|
-
- **Pixel assembly on scroll**: the reverse of disintegration as an ENTRANCE —
|
|
339
|
-
the image begins as scattered pixel blocks/particles (WebGL point grid ≤10k,
|
|
340
|
-
or DOM: a coarse tile grid at randomized scatter positions/rotations) and
|
|
341
|
-
scroll progress converges them into the finished picture; `uProgress` lerps
|
|
342
|
-
each point from its noise-scattered origin to its texel home, alpha ramping
|
|
343
|
-
up, optionally staggered radially or along a directional sweep. Pair with
|
|
344
|
-
the headline resolving in the same beat. Scroll-back re-scatters
|
|
345
|
-
(reversible). Variants: assemble from RGB-split ghosts converging, from
|
|
346
|
-
mosaic chunks sharpening (§2 pixel swap driven per-tile), or from another
|
|
347
|
-
image's dispersed particles (image A dissolves → its particles re-form as
|
|
348
|
-
image B: a particle CROSSFADE between chapters).
|
|
349
|
-
- **Pixel sort / smear on velocity**: scroll velocity smears the image's
|
|
350
|
-
pixels along one axis (shader: offset UV lookup by per-column noise ×
|
|
351
|
-
velocity, or stretch bright bands glitch-style), decaying to sharp at rest
|
|
352
|
-
— agitation that answers the visitor's speed. Digital/editorial registers.
|
|
353
|
-
- **Halftone/ASCII materialize**: media enters as its own halftone dots,
|
|
354
|
-
scanlines, or character grid and resolves to the photograph on scroll or
|
|
355
|
-
in-view — resolution as narrative. Budget: CSS `mask` with a dot pattern
|
|
356
|
-
scaling down; full: a LUT/threshold shader ramping cell size to zero.
|
|
357
|
-
- **Living overlay**: a shader/canvas layer ON TOP of the media that reacts
|
|
358
|
-
while the image stays legible beneath — flowfield streaks along the
|
|
359
|
-
subject's edges, scanline/glitch bursts on scroll velocity, a displacement
|
|
360
|
-
ripple radiating from the cursor, halftone dots that swell near the
|
|
361
|
-
pointer. The overlay is the same §3 plane sampling the same texture —
|
|
362
|
-
never a second copy of the asset.
|
|
363
|
-
- **Print develop**: media enters as paper-white → exposure/contrast/duotone
|
|
364
|
-
ramps to full grade (CSS `filter` keyframes or a LUT shader), timed with
|
|
365
|
-
the headline reveal. Photography/portfolio registers.
|
|
366
|
-
|
|
367
|
-
### The exploration protocol (run it before choosing anything)
|
|
368
|
-
|
|
369
|
-
The catalogs in this file are calibration, not a menu — the failure mode they
|
|
370
|
-
create is pattern-matching to the nearest listed effect. At dial ≥ 7, before
|
|
371
|
-
committing the media column of the blueprint, generate **three candidate
|
|
372
|
-
treatments that do not appear verbatim in this file**, each derived from the
|
|
373
|
-
brand's world (what does this subject physically DO? beans pour and tumble;
|
|
374
|
-
fabric folds and drapes; ink bleeds; glass refracts; records spin; steam
|
|
375
|
-
rises). Write the three candidates + the pick into the plan file with one
|
|
376
|
-
line each on construction cost. Pick the boldest one that clears §5's floors
|
|
377
|
-
and the register — if all three are weaker than a §2.5 exotic, use the
|
|
378
|
-
exotic, but the exploration must have happened. A media plan assembled purely
|
|
379
|
-
from listed effects, with no rejected invention on record, is minimum-effort
|
|
380
|
-
compliance.
|
|
381
|
-
|
|
382
|
-
### Exploration catalog (further constructions — steal the mechanics, reskin the idea)
|
|
383
|
-
|
|
384
|
-
Images beyond the frame:
|
|
385
|
-
|
|
386
|
-
- **Physics gallery**: images as draggable/throwable bodies (Rapier 2D or
|
|
387
|
-
a spring sim) that collide, settle, and stack; scroll shakes the pile.
|
|
388
|
-
- **Infinite drag canvas**: a 2D plane of scattered media the visitor pans
|
|
389
|
-
through (drag + inertia), items waking (scale/unblur/play) near the
|
|
390
|
-
viewport center — the exploration-museum pattern.
|
|
391
|
-
- **Image as terrain**: the photo's luminance drives vertex displacement on
|
|
392
|
-
a plane — the image becomes a relief the camera glides over on scroll.
|
|
393
|
-
- **Fake-3D depth parallax**: one still + a (generated or estimated) depth
|
|
394
|
-
map; UV offset by depth × cursor/gyro = a photo with real parallax inside.
|
|
395
|
-
- **Cursor echo trail**: moving the cursor across a gallery leaves a decaying
|
|
396
|
-
trail of image fragments/duplicates that fade behind it.
|
|
397
|
-
- **Collage assembly**: a section's imagery enters as scattered scraps
|
|
398
|
-
(rotated, layered, torn edges) that scroll pulls into a composed collage —
|
|
399
|
-
the reverse of disintegration.
|
|
400
|
-
- **Lens/magnifier**: a draggable optic over a large image or dense contact
|
|
401
|
-
sheet, refracting (WebGL) or scaling (CSS) what's beneath.
|
|
402
|
-
|
|
403
|
-
Video beyond autoplay:
|
|
404
|
-
|
|
405
|
-
- **Scrub-as-transition**: a 1-2s generated clip scrubbed by route/section
|
|
406
|
-
transition progress — the page change IS the video (door opens, liquid
|
|
407
|
-
pours, light sweeps).
|
|
408
|
-
- **Video-lit scene**: sample the playing video's average/dominant color per
|
|
409
|
-
frame (offscreen canvas) and drive ambient page tint/glow from it — the
|
|
410
|
-
video becomes the room's light source.
|
|
411
|
-
- **Timeline flipbook**: N generated stills of one subject across time/states
|
|
412
|
-
flipped by scroll — a bean roasting darker, a garment assembling — the
|
|
413
|
-
narrative version of a scrub sequence.
|
|
414
|
-
|
|
415
|
-
Props beyond floating (§1.5 behaviors, upgraded):
|
|
416
|
-
|
|
417
|
-
- **Flocking swarms**: 20-80 instanced prop cutouts with boids/noise motion
|
|
418
|
-
that scatter from the cursor and reform into a loose formation (or the
|
|
419
|
-
brand mark's silhouette) at rest.
|
|
420
|
-
- **Pour/emit systems**: props emitted from a source object (beans from a
|
|
421
|
-
bag, petals from a stem) on scroll or click, falling with gravity + drag,
|
|
422
|
-
settling into a pile that persists per session.
|
|
423
|
-
- **Props as UI**: the prop IS the control — a bean that drags along a
|
|
424
|
-
roast-level slider, a bottle that tilts to pour the page to the next
|
|
425
|
-
section. One per page; must keep an obvious conventional equivalent.
|
|
426
|
-
|
|
427
|
-
Same law as §2.5: every construction here still clears §5's floors, earns one
|
|
428
|
-
sentence of communication value, and the §0 set-piece count (one by default;
|
|
429
|
-
a justified second at award) — an exploration catalog is not permission to
|
|
430
|
-
ship five spectacles.
|
|
431
|
-
|
|
432
|
-
Discipline stays the law: the composed treatment must still clear §5's floors,
|
|
433
|
-
DESIGN.md §6's "one sentence of communication value", and one-signature-
|
|
434
|
-
per-page — an inventive effect stamped on every image is as loud as a marquee
|
|
435
|
-
on every section.
|
|
436
|
-
|
|
437
|
-
## 3. WebGL tier — the media plane (the unseen.co mechanic)
|
|
438
|
-
|
|
439
|
-
When dial ≥ 8 or cinematic/immersive is active, media renders THROUGH the
|
|
440
|
-
canvas so shaders can touch it. **At award-site ambition this section is a
|
|
441
|
-
REQUIREMENT, not an option**: the hero image and at least one gallery/section
|
|
442
|
-
image set must be live media planes whose shader visibly responds to scroll
|
|
443
|
-
(velocity distortion, dissolve, RGB split, curvature — pick from §2.5) — a
|
|
444
|
-
page whose images all sit in flat DOM rectangles has not met the tier, no
|
|
445
|
-
matter how much 3D floats around them. Verification must prove it: sample a
|
|
446
|
-
plane's driven uniform (e.g. `uVelocity`, `uProgress`) or its rect-synced
|
|
447
|
-
transform during a scripted scroll and record two differing values in
|
|
448
|
-
verify.md. The core pattern, in order:
|
|
449
|
-
|
|
450
|
-
1. **Sync planes to DOM rects.** Real `<img>`/`<video>` elements stay in the
|
|
451
|
-
document (a11y, SEO, layout, fallback) but render invisible
|
|
452
|
-
(`opacity: 0`, NOT `display:none` — layout must persist). For each, a
|
|
453
|
-
textured plane in an orthographic/fitted scene copies its
|
|
454
|
-
`getBoundingClientRect()` every scroll/resize (rAF-batched; lerp the
|
|
455
|
-
position for the floaty feel). Texture from `TextureLoader` or
|
|
456
|
-
`new THREE.VideoTexture(videoEl)` (video must be `muted playsinline` and
|
|
457
|
-
playing; `texture.colorSpace = SRGBColorSpace`).
|
|
458
|
-
2. **Distortion in the fragment/vertex shader**, uniforms driven by input:
|
|
459
|
-
- *Hover ripple/lens*: damped `uMouse` + `uHoverStrength` 0→1 spring; UV
|
|
460
|
-
displacement by radial falloff or noise.
|
|
461
|
-
- *Velocity stretch / RGB split*: scroll or drag velocity (from Lenis /
|
|
462
|
-
`useScroll`) → vertex bend + per-channel UV offset, hard-clamped, damped
|
|
463
|
-
decay to zero (cinematic.md §2). Peak effect at a fast flick stays legible.
|
|
464
|
-
- *Transition dissolve*: two textures + noise mask `mix()` for gallery/
|
|
465
|
-
route image swaps (3d.md §4).
|
|
466
|
-
3. **Curved/warped planes**: subtle vertex bend (unseen's floating paper
|
|
467
|
-
sheets) — displace z by a small curve of UV.x + scroll velocity.
|
|
468
|
-
|
|
469
|
-
Rules: ONE media-plane system per page owning all planes (one scene, one rAF —
|
|
470
|
-
never a canvas per image); planes pause syncing when off-screen; the DOM
|
|
471
|
-
element remains the interaction target (click/focus/hover listeners on the DOM,
|
|
472
|
-
effects on the plane); reduced-motion and WebGL-failure both fall back to
|
|
473
|
-
simply un-hiding the DOM media (set `opacity: 1`) — this fallback must be
|
|
474
|
-
wired, not theoretical, and it's the first thing runtime verification checks.
|
|
475
|
-
|
|
476
|
-
## 3.5 Going INSIDE the media (immersion recipes)
|
|
477
|
-
|
|
478
|
-
The strongest media moment on the modern web is not looking AT an image —
|
|
479
|
-
it's the camera going INTO it: the photo stops being a rectangle on a page
|
|
480
|
-
and becomes, briefly, the space the visitor is in. These are the recipes,
|
|
481
|
-
cheapest first; at dial ≥ 8 with a canvas, prefer one of these as (or inside)
|
|
482
|
-
the set-piece over any flat treatment:
|
|
483
|
-
|
|
484
|
-
1. **The portal dive (DOM tier — no WebGL needed).** Pin the section; scroll
|
|
485
|
-
scales the image from framed rectangle past 100% of the viewport while a
|
|
486
|
-
`clip-path` aperture opens, until its interior IS the background — and the
|
|
487
|
-
next section's content fades in already "inside" it (its palette sampled
|
|
488
|
-
from the image's deep tones so the world feels continuous). Reverse on
|
|
489
|
-
scroll-back. Layer 2-3 depth children (see recipe 3) inside the frame and
|
|
490
|
-
the dive reads as truly spatial, not as a zoom.
|
|
491
|
-
2. **The depth-map dive (WebGL, the real thing).** Get a depth map for the
|
|
492
|
-
image: generate one (prompt the image tool for "depth map of this scene,
|
|
493
|
-
white near black far" alongside the still), or approximate from luminance/
|
|
494
|
-
a vertical gradient for scenes with obvious near-ground/far-sky structure.
|
|
495
|
-
Subdivided plane (~128×128), vertex shader displaces z by depth × uDolly;
|
|
496
|
-
scroll drives the camera INTO the displaced relief (dolly + slight fov
|
|
497
|
-
ease) while pointer shifts a ±3-5° parallax. Near pixels slide past the
|
|
498
|
-
camera edges as you enter — that edge-slide is what sells "inside".
|
|
499
|
-
Occlusion artifacts at the silhouette are hidden with fog/vignette matched
|
|
500
|
-
to the image's palette.
|
|
501
|
-
3. **The diorama (matted layers).** Cut the image into 2-4 real layers
|
|
502
|
-
(subject / midground / backdrop — matte with the §1.5 cutout pipeline, or
|
|
503
|
-
generate the layers separately in the same prompt world). Place them at
|
|
504
|
-
real z-depths (WebGL planes or CSS `translateZ` with perspective on the
|
|
505
|
-
parent) and move the camera between them on scroll: passing a foreground
|
|
506
|
-
layer's edge as it exits the frame is the moment the brain accepts depth.
|
|
507
|
-
The generated-layers path beats matting: ask the image tool for the same
|
|
508
|
-
scene as "foreground elements only, transparent background" + "empty
|
|
509
|
-
background plate".
|
|
510
|
-
4. **The particle fly-through.** Build the image as a point cloud (§2.5
|
|
511
|
-
disintegration budget: ≤ 10k points sampled from the texture, point size
|
|
512
|
-
by luminance). Scroll doesn't just dissolve it — it drives the camera
|
|
513
|
-
THROUGH the cloud: points ahead grow, pass the camera plane, and exit
|
|
514
|
-
behind (kill/respawn them past z=camera). Halfway through, the cloud
|
|
515
|
-
re-forms into the NEXT image — one continuous flight from picture to
|
|
516
|
-
picture is a set-piece by itself.
|
|
517
|
-
5. **The scrub-dive (video/frames).** A scroll-scrubbed frame sequence
|
|
518
|
-
(generate-sequence, or frames extracted from video via ffmpeg) whose
|
|
519
|
-
camera already moves INTO the scene (prompt the generation that way:
|
|
520
|
-
"dolly forward into…"); pin the section, map scroll → frame index
|
|
521
|
-
(preload + draw to a canvas, never seek a `<video>` per frame), and the
|
|
522
|
-
visitor's scroll finger literally walks the camera in. Exit the pin at
|
|
523
|
-
the deepest frame into a section graded to that frame's palette.
|
|
524
|
-
|
|
525
|
-
Wiring rules: these are still media planes — DOM element stays for a11y and
|
|
526
|
-
the fallback is the graded flat image (§3's rules apply unchanged). ONE dive
|
|
527
|
-
per page (it's a set-piece-class moment; two dives cheapen both). The dive
|
|
528
|
-
target must be an image whose composition has actual depth to enter (a
|
|
529
|
-
corridor, a room, a landscape, machinery receding) — prompt/choose the asset
|
|
530
|
-
for that; diving into a flat-lit product shot reads as a zoom, which is the
|
|
531
|
-
failure this section replaces.
|
|
532
|
-
|
|
533
|
-
## 4. Choosing the treatment (the reasoning frame)
|
|
534
|
-
|
|
535
|
-
Per media element, walk this in one line each — it's the media ledger the plan
|
|
536
|
-
blueprint (PLAN.md §2) captures:
|
|
537
|
-
|
|
538
|
-
1. **Role**: hero atmosphere / product evidence / work-card / texture / story
|
|
539
|
-
beat? Evidence media (screenshots, product photos) gets QUIET treatments —
|
|
540
|
-
curtain reveal, ken-burns; atmosphere media can take the loud/invented ones.
|
|
541
|
-
2. **Tier**: does the page already pay for WebGL? If yes, media planes (§3);
|
|
542
|
-
if no, a DOM treatment (§2) or the DOM construction of a §2.5 invention —
|
|
543
|
-
never add a canvas only to distort one image.
|
|
544
|
-
3. **Entrance / idle / response** per §0, matched to register and dial.
|
|
545
|
-
4. **Failure path**: poster/static version named (reduced-motion, load
|
|
546
|
-
failure, mobile tier).
|
|
547
|
-
|
|
548
|
-
## 5. Floors (every treatment, non-negotiable)
|
|
549
|
-
|
|
550
|
-
- `prefers-reduced-motion`: poster frame / static image, no autoplaying loops,
|
|
551
|
-
no scrub (static end-state). Test by toggling it.
|
|
552
|
-
- Videos: `muted autoplay loop playsinline preload="metadata"` + `poster`;
|
|
553
|
-
pause when off-screen (IntersectionObserver) and on `document.hidden`; no
|
|
554
|
-
audio tracks ever on ambient loops.
|
|
555
|
-
- Loading: explicit `width/height` or `aspect-ratio` on every media box (zero
|
|
556
|
-
CLS); LCP image/poster preloaded, everything below the fold lazy; a media box
|
|
557
|
-
is never blank — poster, dominant-color fill, or blur-up while loading.
|
|
558
|
-
- Hover treatments have focus equivalents; touch gets the tap/visible-default
|
|
559
|
-
story (DESIGN.md §13); media planes and canvases are `pointer-events-none`
|
|
560
|
-
unless they ARE the control.
|
|
561
|
-
- Budgets: one video loop playing per view, ≤ 2-4MB per loop, sequences ≤
|
|
562
|
-
~6MB total, `dpr` capped on media-plane canvases (3d.md §7).
|
|
563
|
-
- Alt text carries voice on images; videos that convey content (not
|
|
564
|
-
atmosphere) get a text alternative nearby.
|
|
1
|
+
# Dreative Specialist Skill — Media as Motion Material
|
|
2
|
+
|
|
3
|
+
## Contract
|
|
4
|
+
|
|
5
|
+
Follow `../references/SKILL_CONTRACT.md`. Dependencies: `ux`, `mobile`; add
|
|
6
|
+
`motion` for animated treatments and `3d` for media planes. Deliver an asset
|
|
7
|
+
manifest, rights/source note, crop/grade/compression work, dimensions/posters,
|
|
8
|
+
responsive treatment, fallback, and runtime evidence. Hard gates remain absolute.
|
|
9
|
+
|
|
10
|
+
Load when `plan.skills` includes `media`, the blueprint generates media, or a
|
|
11
|
+
motion-led page depends on imagery/video. DESIGN.md still governs sourcing,
|
|
12
|
+
semantics, layout, and preservation.
|
|
13
|
+
|
|
14
|
+
## 0. Explore before recipes
|
|
15
|
+
|
|
16
|
+
Read the brief, assets, brand world, doctrine, and this file first. Generate and
|
|
17
|
+
record three original brand-native media concepts in `conceptExploration` before
|
|
18
|
+
opening `../recipes/media-recipes.md`. Recipe access is only for feasibility,
|
|
19
|
+
implementation, performance, fallback selection, or repairing a weak concept;
|
|
20
|
+
record it in `recipeAccess`.
|
|
21
|
+
|
|
22
|
+
Effect names are examples, not a menu. The concept begins with what the media
|
|
23
|
+
means, how the visitor changes its logic, and how that behavior develops through
|
|
24
|
+
the page.
|
|
25
|
+
|
|
26
|
+
## 1. Hard gates
|
|
27
|
+
|
|
28
|
+
- Planned shipped assets exist, are distinct where promised, and visibly render
|
|
29
|
+
(`assets.plannedExist`). Track source/rights, aspect, grade, poster, and use.
|
|
30
|
+
- Media never hides content, intercepts controls, or breaks layout. DOM media
|
|
31
|
+
remains semantic and available when enhancement fails (`content.visible`,
|
|
32
|
+
`spatial.noOcclusion`).
|
|
33
|
+
- Every video/WebGL/sequence treatment has loading, reduced-motion, low-power,
|
|
34
|
+
mobile, and runtime fallbacks (`motion.reducedMotion`,
|
|
35
|
+
`effects.runtimeFallback`).
|
|
36
|
+
- A real organic subject is never approximated with crude coded primitives
|
|
37
|
+
(`3d.noCodedOrganic`). Use a real GLB, photoreal cutout, sourced image, or cut
|
|
38
|
+
the claimed object.
|
|
39
|
+
- Verification uses real artifacts and measurements, not textual claims
|
|
40
|
+
(`verification.realEvidence`).
|
|
41
|
+
|
|
42
|
+
## 2. Baseline media quality
|
|
43
|
+
|
|
44
|
+
Every meaningful asset gets an intentional role: entrance, idle life, visitor
|
|
45
|
+
response, or a documented static/rest purpose. A page of identical fade-plus-
|
|
46
|
+
zoom treatments is the recurring failure this skill exists to prevent.
|
|
47
|
+
|
|
48
|
+
- Edit assets before placement: crop to the blueprint, grade to the palette,
|
|
49
|
+
compress, cut clean loops, create posters, and prepare masks/depth/plates.
|
|
50
|
+
- A treatment claiming to transform an image must consume that image's pixels
|
|
51
|
+
and align to its bounds. A separate shader/noise rectangle floating over a
|
|
52
|
+
static image is decoration, not treatment.
|
|
53
|
+
- Human perception matters: before/after states must visibly change content,
|
|
54
|
+
not merely produce tiny uniform deltas a sampler can detect.
|
|
55
|
+
- Quiet sections are valid and necessary when they create pacing. “Restraint”
|
|
56
|
+
is not permission for an underdesigned whole page.
|
|
57
|
+
|
|
58
|
+
## 3. Evidence-backed defaults
|
|
59
|
+
|
|
60
|
+
Follow the proven default, or outperform it with a named alternative,
|
|
61
|
+
measurable success criteria, and runtime evidence.
|
|
62
|
+
|
|
63
|
+
### Participatory moment (`media.award.participatoryMoment`)
|
|
64
|
+
|
|
65
|
+
At expressive/award ambition, the proven default is one memorable point where
|
|
66
|
+
the visitor moves from observing media to affecting, entering, transforming, or
|
|
67
|
+
controlling its visual logic. For image-led award concepts with depth-capable
|
|
68
|
+
assets, a depth dive is the default because it repeatedly produced a legible
|
|
69
|
+
immersive peak.
|
|
70
|
+
|
|
71
|
+
Valid registered alternatives include decomposition/reassembly, temporal
|
|
72
|
+
scrubbing, physical drag/inertia, refractive exploration, scene-responsive
|
|
73
|
+
media, or a brand-specific transformation of equal perceptual impact. A curtain,
|
|
74
|
+
fade, plain parallax, or rectangle movement alone is not equivalent.
|
|
75
|
+
|
|
76
|
+
### Pixel coverage (`media.award.pixelCoverage`)
|
|
77
|
+
|
|
78
|
+
The proven award default is pixel-class treatment on at least half of hero/key
|
|
79
|
+
images, minimum three, using distinct mechanisms with quiet-class rests. This
|
|
80
|
+
exists because dogfood builds shipped one strong hero while the remaining page
|
|
81
|
+
stayed static.
|
|
82
|
+
|
|
83
|
+
A registered substitution is valid when one coherent media system visibly
|
|
84
|
+
develops through at least three materially different roles or states—for
|
|
85
|
+
example archive sheets becoming a draggable surface, then a tunnel, then a
|
|
86
|
+
final mark. Evidence must make each state obvious.
|
|
87
|
+
|
|
88
|
+
### Perceivability
|
|
89
|
+
|
|
90
|
+
Pixel-class behavior changes the image content: displacement, decomposition,
|
|
91
|
+
reassembly, scrubbed time, refractive feedback, or another brand-native logic.
|
|
92
|
+
Tune it until screenshot/trace pairs are unmistakably different. Zoom, pan,
|
|
93
|
+
opacity, or moving the rectangle are quiet-class behaviors, not pixel-class.
|
|
94
|
+
|
|
95
|
+
## 4. Production and props
|
|
96
|
+
|
|
97
|
+
Prefer, in order: supplied/client assets; generated assets suited to the exact
|
|
98
|
+
section; verified sourced media; clearly labeled placeholders. Generation is
|
|
99
|
+
the start of production, not the finished asset.
|
|
100
|
+
|
|
101
|
+
For isolated props:
|
|
102
|
+
|
|
103
|
+
- reserve a compositional berth that never covers text or controls;
|
|
104
|
+
- use real transparency and verify the matte;
|
|
105
|
+
- grade light direction and contact shadow into the page system;
|
|
106
|
+
- sell dimension with restrained parallax/rotation/scale and readable fallback;
|
|
107
|
+
- reuse the same asset for the same need, never one seed for distinct subjects.
|
|
108
|
+
|
|
109
|
+
For video: muted/autoplay/loop/playsinline when appropriate, real poster, no
|
|
110
|
+
layout shift, pause off-screen/hidden, reduced motion uses the poster.
|
|
111
|
+
|
|
112
|
+
## 5. Media planes
|
|
113
|
+
|
|
114
|
+
Use one scene for multiple DOM-synced media planes. Keep the real DOM image/video
|
|
115
|
+
for semantics and fallback; synchronize its bounding rect and use the same asset
|
|
116
|
+
as the plane texture. Cap DPR, pause off-screen, handle context loss, and reveal
|
|
117
|
+
the DOM source when WebGL fails. A canvas per image and misaligned overlay planes
|
|
118
|
+
are invalid implementations.
|
|
119
|
+
|
|
120
|
+
## 6. Planning and verification
|
|
121
|
+
|
|
122
|
+
The blueprint records asset path/source, purpose, treatment class, driver,
|
|
123
|
+
mobile behavior, fallback, and success criteria. At expressive/award, record the
|
|
124
|
+
page's `creativeStrategy` as diversity or development.
|
|
125
|
+
|
|
126
|
+
Verification records:
|
|
127
|
+
|
|
128
|
+
- asset existence and rendered identity;
|
|
129
|
+
- viewport-aligned effect/image rects;
|
|
130
|
+
- before/after artifacts for perceptual change;
|
|
131
|
+
- sampled shader/particle/frame/drag state where applicable;
|
|
132
|
+
- tested URL, console count, mobile viewport, reduced-motion result;
|
|
133
|
+
- frame time/FPS and transferred asset weight for heavy treatments.
|
|
134
|
+
|
|
135
|
+
Recipe reference: `../recipes/media-recipes.md`, after concept exploration only.
|