@genex-ai/cli-demo 0.6.0 → 0.6.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.
Files changed (45) hide show
  1. package/dist/index.js +5 -0
  2. package/package.json +1 -1
  3. package/templates/skills/genex-threejs-atmosphere-aerial-perspective/SKILL.md +30 -18
  4. package/templates/skills/genex-threejs-atmosphere-aerial-perspective/references/atmosphere.md +204 -20
  5. package/templates/skills/genex-threejs-bloom/SKILL.md +29 -18
  6. package/templates/skills/genex-threejs-bloom/references/bloom.md +176 -20
  7. package/templates/skills/genex-threejs-camera-direction/SKILL.md +38 -26
  8. package/templates/skills/genex-threejs-camera-direction/references/camera-rigs.md +359 -27
  9. package/templates/skills/genex-threejs-exposure-color-grading/SKILL.md +27 -18
  10. package/templates/skills/genex-threejs-exposure-color-grading/references/exposure-grading.md +196 -21
  11. package/templates/skills/genex-threejs-image-pipeline/SKILL.md +38 -17
  12. package/templates/skills/genex-threejs-image-pipeline/references/image-pipeline.md +185 -29
  13. package/templates/skills/genex-threejs-procedural-animation/SKILL.md +34 -21
  14. package/templates/skills/genex-threejs-procedural-animation/references/procedural-motion.md +353 -24
  15. package/templates/skills/genex-threejs-procedural-architecture/SKILL.md +36 -17
  16. package/templates/skills/genex-threejs-procedural-architecture/references/architecture-systems.md +500 -22
  17. package/templates/skills/genex-threejs-procedural-fields/SKILL.md +59 -24
  18. package/templates/skills/genex-threejs-procedural-fields/references/field-systems.md +222 -25
  19. package/templates/skills/genex-threejs-procedural-geometry/SKILL.md +34 -20
  20. package/templates/skills/genex-threejs-procedural-geometry/references/mesh-systems.md +192 -26
  21. package/templates/skills/genex-threejs-procedural-materials/SKILL.md +55 -18
  22. package/templates/skills/genex-threejs-procedural-materials/references/material-systems.md +189 -22
  23. package/templates/skills/genex-threejs-procedural-planets/SKILL.md +36 -18
  24. package/templates/skills/genex-threejs-procedural-planets/references/planet-systems.md +489 -21
  25. package/templates/skills/genex-threejs-procedural-vegetation/SKILL.md +35 -25
  26. package/templates/skills/genex-threejs-procedural-vegetation/references/vegetation-systems.md +304 -27
  27. package/templates/skills/genex-threejs-procedural-vfx/SKILL.md +26 -18
  28. package/templates/skills/genex-threejs-procedural-vfx/references/vfx-systems.md +208 -20
  29. package/templates/skills/genex-threejs-raymarched-space-effects/SKILL.md +25 -18
  30. package/templates/skills/genex-threejs-raymarched-space-effects/references/space-effects.md +185 -21
  31. package/templates/skills/genex-threejs-screen-space-ambient-occlusion/SKILL.md +23 -17
  32. package/templates/skills/genex-threejs-screen-space-ambient-occlusion/references/ambient-occlusion.md +430 -20
  33. package/templates/skills/genex-threejs-shadow-systems/SKILL.md +29 -18
  34. package/templates/skills/genex-threejs-shadow-systems/references/shadow-systems.md +420 -21
  35. package/templates/skills/genex-threejs-skill-router/SKILL.md +21 -21
  36. package/templates/skills/genex-threejs-spectral-ocean/SKILL.md +30 -20
  37. package/templates/skills/genex-threejs-spectral-ocean/references/spectral-ocean.md +462 -22
  38. package/templates/skills/genex-threejs-temporal-surfaces/SKILL.md +26 -17
  39. package/templates/skills/genex-threejs-temporal-surfaces/references/temporal-surfaces.md +198 -20
  40. package/templates/skills/genex-threejs-visual-validation/SKILL.md +34 -18
  41. package/templates/skills/genex-threejs-visual-validation/references/visual-validation.md +396 -32
  42. package/templates/skills/genex-threejs-volumetric-clouds/SKILL.md +33 -17
  43. package/templates/skills/genex-threejs-volumetric-clouds/references/volumetric-clouds.md +570 -21
  44. package/templates/skills/genex-threejs-water-optics/SKILL.md +33 -18
  45. package/templates/skills/genex-threejs-water-optics/references/water-optics.md +184 -20
@@ -1,42 +1,406 @@
1
- # Visual Validation
1
+ # Graphics validation protocol
2
2
 
3
- Use this checklist before considering a Genex 3D browser-game visual complete.
3
+ Use this protocol to evaluate authored graphics through deterministic final
4
+ frames, mechanism-isolation views, temporal evidence, scale tests, seed sweeps,
5
+ and explicit GPU budgets.
4
6
 
5
- ## Evidence set
7
+ ## Contents
6
8
 
7
- - Fixed seed and configuration.
8
- - Fixed camera positions: near, design distance, and far.
9
- - Final capture.
10
- - No-post baseline.
11
- - Diagnostic views for major fields, masks, passes, or buffers.
12
- - Motion capture or interactive check for temporal effects.
13
- - Frame time and render-target inventory when available.
9
+ - Acceptance principle
10
+ - Visual contract
11
+ - Required inspection controls
12
+ - Mechanism-specific evidence
13
+ - No-post and isolation gates
14
+ - Determinism and captures
15
+ - Temporal validation
16
+ - Performance and resolution
17
+ - Rejection criteria
18
+ - Sign-off record
14
19
 
15
- ## Browser checks
20
+ ## Acceptance principle
16
21
 
17
- - Canvas is nonblank.
18
- - Scene is framed correctly on desktop and mobile-sized viewports.
19
- - Resize keeps camera aspect and render targets correct.
20
- - Pointer, keyboard, touch, or gamepad input works for the intended controls.
21
- - Assets load without broken URLs.
22
- - The main loop can pause/resume without exploding `deltaTime`.
22
+ Accept an implementation only when all four layers agree:
23
23
 
24
- ## Diagnostic views
24
+ ```text
25
+ declared visual mechanism
26
+ -> inspectable implementation
27
+ -> diagnostic evidence
28
+ -> final image that satisfies the visual contract
29
+ ```
25
30
 
26
- Prefer simple toggles over hidden assumptions:
31
+ Code plausibility is insufficient. A visually weak result means the mechanism
32
+ is incomplete, misweighted, or badly presented. A beautiful final frame is
33
+ also insufficient when it hides field instability, broken depth, temporal
34
+ failure, or dependence on post-processing.
27
35
 
28
- - wireframe or bounds;
29
- - normals;
30
- - depth;
31
- - masks;
32
- - raw fields;
33
- - no-light and no-post modes;
34
- - individual post effects.
36
+ ## Visual contract
35
37
 
36
- ## Rejection conditions
38
+ Write this before tuning:
37
39
 
38
- - The result depends on a single lucky seed.
39
- - Fine detail shimmers in motion.
40
- - Camera movement reveals parallax or precision errors.
41
- - Post-processing hides unreadable geometry or materials.
42
- - Performance cost has no lower-quality escape hatch.
40
+ ```ts
41
+ type VisualContract = {
42
+ subject: string
43
+ identity: string[]
44
+ silhouette: string[]
45
+ materialSeparation: string[]
46
+ motion: string[]
47
+ cameraEnvelope: {
48
+ near: number
49
+ design: number
50
+ far: number
51
+ }
52
+ lightingEnvelope: string[]
53
+ invariants: string[]
54
+ allowedDivergences: string[]
55
+ frameBudgetMs: number
56
+ memoryBudgetMB?: number
57
+ }
58
+ ```
59
+
60
+ Each invariant must be observable. Replace “looks cinematic” with statements
61
+ such as:
62
+
63
+ ```text
64
+ the primary rim remains visible without bloom
65
+ the water horizon does not reveal the mesh boundary
66
+ tree card roots remain attached under maximum wind
67
+ planet coast width is stable from orbit to mid approach
68
+ cloud history rejects across a foreground disocclusion
69
+ ```
70
+
71
+ When matching a supplied visual reference, record the mechanisms that create
72
+ its identity and every deliberate divergence in backend, resolution, asset,
73
+ scale, or composition. Do not substitute a generic category match for the
74
+ specific visual contract.
75
+
76
+ ## Required inspection controls
77
+
78
+ Any runnable inspection surface should expose the controls relevant to its
79
+ mechanism:
80
+
81
+ ```text
82
+ pause / resume
83
+ fixed time or time scale
84
+ fixed seed
85
+ fixed camera bookmarks
86
+ viewport and DPR
87
+ quality tier
88
+ debug mode
89
+ canvas capture
90
+ runtime metrics
91
+ reset history
92
+ ```
93
+
94
+ At minimum, provide:
95
+
96
+ - one design camera;
97
+ - near and far camera bookmarks;
98
+ - final and no-post views;
99
+ - every controlling field or pass needed to prove the mechanism;
100
+ - a deterministic reset;
101
+ - visible runtime errors and performance metrics.
102
+
103
+ Controls must alter the actual pipeline. A debug dropdown that only changes a
104
+ label is worse than no diagnostic because it creates false confidence.
105
+
106
+ ## Mechanism-specific evidence
107
+
108
+ ### Procedural growth
109
+
110
+ Report topology separately from final composition:
111
+
112
+ ```text
113
+ branch jobs by level
114
+ terminal continuations by level
115
+ lateral children by level
116
+ ring and leaf-card counts
117
+ branch and leaf bounds
118
+ seed
119
+ ```
120
+
121
+ Inspect:
122
+
123
+ - hierarchy-only;
124
+ - continuation branches;
125
+ - foliage roots and rounded normals;
126
+ - final composition;
127
+ - maximum wind;
128
+ - at least three seeds.
129
+
130
+ The species identity must survive the seed sweep. Seed changes may alter
131
+ branch placement and crown asymmetry; they may not turn one growth model into
132
+ another.
133
+
134
+ ### Spectral water
135
+
136
+ Require:
137
+
138
+ ```text
139
+ disjoint wavelength ownership per cascade
140
+ independent FFT impulse and frequency tests
141
+ height and horizontal displacement fields
142
+ transformed derivative maps
143
+ Jacobian or breaking metric
144
+ persistent foam history
145
+ shared sky/reflection parameters
146
+ ```
147
+
148
+ Inspect individual cascades, resolved normals, breaking/foam state, and final
149
+ shading. A plausible ocean frame does not prove that the FFT, derivatives, or
150
+ history are correct.
151
+
152
+ ### Analytic water
153
+
154
+ Require displacement and normals to derive from the same wave bundle. Inspect:
155
+
156
+ ```text
157
+ displacement only
158
+ resolved normals
159
+ Fresnel
160
+ reflection
161
+ refraction
162
+ absorption or thickness estimate
163
+ crest response and foam
164
+ ```
165
+
166
+ Test near-grazing views, far-horizon minification, and a high-DPR capture.
167
+ Reject sparkling micro-bands that survive below one pixel.
168
+
169
+ ### Planet fields and atmosphere
170
+
171
+ Require:
172
+
173
+ ```text
174
+ undeformed sphere direction
175
+ macro height
176
+ continents and coast
177
+ climate or biome causes
178
+ resolved normals and roughness
179
+ surface lighting without atmosphere
180
+ atmosphere only
181
+ combined final
182
+ ```
183
+
184
+ Inspect orbit, mid approach, and close approach. Surface and atmosphere must
185
+ share body center, radius, sun direction, and scale conversion. A shell that
186
+ looks acceptable only against black space is not sufficient evidence of
187
+ ground-to-space continuity.
188
+
189
+ ### Volumetric clouds
190
+
191
+ Require:
192
+
193
+ ```text
194
+ weather channels
195
+ base-shape density
196
+ detail erosion
197
+ bounded ray interval
198
+ beauty transmittance
199
+ lighting contribution
200
+ history confidence or rejection
201
+ cloud shadow
202
+ ```
203
+
204
+ Test camera translation, foreground disocclusion, sun-angle changes, and
205
+ quality-tier transitions. Still frames cannot validate temporal reconstruction.
206
+
207
+ ### Curved-ray and volumetric effects
208
+
209
+ Expose:
210
+
211
+ ```text
212
+ integration bounds
213
+ step or iteration count
214
+ accumulated steering
215
+ density contribution
216
+ remaining transmittance
217
+ background lookup direction
218
+ capped or invalid pixels
219
+ ```
220
+
221
+ Use a stress camera that approaches the singular or highest-curvature region.
222
+ Reject NaNs, persistent capped bands, and unexplained asymmetry.
223
+
224
+ ### Temporal surfaces
225
+
226
+ Expose the complete state transition:
227
+
228
+ ```text
229
+ previous history
230
+ current deposit or erase input
231
+ next history
232
+ blurred scene
233
+ static structure
234
+ composite mask
235
+ resolved normal/refraction
236
+ ```
237
+
238
+ Test reset, resize, pointer release, repeated deposition, frame-rate changes,
239
+ and long idle decay. Per-frame decay must be converted to a
240
+ frame-rate-independent response.
241
+
242
+ ### Shadows and post-processing
243
+
244
+ For shadows, inspect:
245
+
246
+ ```text
247
+ level ownership
248
+ committed light-space centers
249
+ texel grid
250
+ levels refreshed this frame
251
+ cross-level blend weights
252
+ normal bias in world units
253
+ unshadowed outside-coverage weight
254
+ ```
255
+
256
+ For post effects, inspect the pre-effect signal, contribution, and final
257
+ composite. Tone mapping and output conversion must have one owner.
258
+
259
+ ## No-post and isolation gates
260
+
261
+ Every example with image effects must expose:
262
+
263
+ ```text
264
+ final
265
+ no bloom or presentation treatment
266
+ effect contribution only
267
+ controlling field or mask
268
+ normal / depth / history when relevant
269
+ ```
270
+
271
+ Reject when:
272
+
273
+ - bloom supplies the only readable silhouette;
274
+ - atmosphere hides flat planet fields;
275
+ - post blur hides aliasing;
276
+ - a normal map implies waves absent from displaced geometry;
277
+ - temporal output cannot show previous state, deposit, and next state;
278
+ - a raymarch cannot reveal iteration pressure or capped pixels;
279
+ - shadows are judged only in the final graded image.
280
+
281
+ ## Determinism and captures
282
+
283
+ Freeze:
284
+
285
+ ```text
286
+ seed
287
+ camera transform and projection
288
+ viewport
289
+ DPR
290
+ time or paused state
291
+ quality tier
292
+ backend
293
+ asset versions
294
+ ```
295
+
296
+ Capture:
297
+
298
+ ```text
299
+ design view
300
+ near/detail view
301
+ far/silhouette view
302
+ no-post baseline
303
+ one controlling diagnostic
304
+ one failure-sensitive diagnostic
305
+ one stress condition
306
+ ```
307
+
308
+ Use exact camera matrices or named camera bookmarks. Reproducing a comparison
309
+ by manually orbiting until it “looks close” invalidates image evidence.
310
+
311
+ For stochastic pixels, either freeze the stochastic sequence or compare a
312
+ stable accumulated result. Do not loosen image thresholds until they stop
313
+ detecting real regressions.
314
+
315
+ ## Temporal validation
316
+
317
+ Use fixed-duration clips or sampled checkpoints for:
318
+
319
+ - camera motion;
320
+ - object motion;
321
+ - history accumulation and rejection;
322
+ - shadow-cache refresh;
323
+ - ocean foam persistence;
324
+ - cloud reconstruction;
325
+ - wind deformation;
326
+ - particle birth, death, and pool reuse.
327
+
328
+ Record at least:
329
+
330
+ ```text
331
+ t = 0 reset
332
+ t = first visible response
333
+ t = steady state
334
+ t = disocclusion or invalidation
335
+ t = recovery
336
+ ```
337
+
338
+ Inspect at normal playback speed and frame-by-frame. Still captures cannot
339
+ prove the absence of shimmer, swimming, stale history, or lifetime pops.
340
+
341
+ ## Performance and resolution
342
+
343
+ Report:
344
+
345
+ ```text
346
+ CPU frame time
347
+ GPU frame time when available
348
+ draw calls
349
+ triangles / points / instances
350
+ simulation resolution
351
+ render-target count, format, and dimensions
352
+ active quality tier
353
+ cache updates this frame
354
+ estimated GPU memory
355
+ ```
356
+
357
+ Never infer GPU cost solely from CPU frame time. Run a warm-up period before
358
+ recording and separate shader compilation from steady-state cost.
359
+
360
+ When reducing quality, identify the preserved mechanism and expected loss:
361
+
362
+ | Reduction | Preserve | Expected loss |
363
+ | --- | --- | --- |
364
+ | lower cloud beauty resolution | density organization and lighting | edge fidelity and thin wisps |
365
+ | fewer atmosphere view steps | shared scattering model | horizon smoothness |
366
+ | smaller spectral grids | cascade and FFT architecture | high-frequency wave richness |
367
+ | reduced shadow update budget | stable committed maps | delayed coarse-level refresh |
368
+ | lower frost blur DPR | history and structure | refraction smoothness |
369
+
370
+ Do not silently lower resolution until a frame looks fast enough.
371
+
372
+ ## Rejection criteria
373
+
374
+ Delete or withhold an example when any applies:
375
+
376
+ - it is visually weaker than the supplied reference in the target feature;
377
+ - its code is mostly generic material or noise boilerplate;
378
+ - mechanism-defining constants or ownership were replaced by guesses;
379
+ - it has no diagnostic mode proving the claimed mechanism;
380
+ - it relies on post-processing to manufacture missing form;
381
+ - it contains undisclosed backend, algorithm, asset, or scale divergences;
382
+ - deterministic reset or fixed-camera capture is impossible;
383
+ - the implementation cannot meet its declared performance envelope;
384
+ - the available evidence is too weak to support excellence-level guidance.
385
+
386
+ ## Sign-off record
387
+
388
+ Record:
389
+
390
+ ```text
391
+ skill and example ID
392
+ visual contract and invariants
393
+ Three.js version and backend
394
+ viewport, DPR, camera bookmark, seed, and time
395
+ mechanisms exercised
396
+ deliberate divergences
397
+ debug modes inspected
398
+ temporal cases inspected
399
+ performance and memory metrics
400
+ known defects
401
+ review decision
402
+ ```
403
+
404
+ Publish only accepted examples. Repeat the same evidence set whenever
405
+ mechanism code, Three.js version, renderer backend, camera, or quality tier
406
+ changes.
@@ -5,25 +5,41 @@ description: Build volumetric cloud systems for Genex Three.js games. Use for we
5
5
 
6
6
  # Genex Three.js Volumetric Clouds
7
7
 
8
- Clouds are expensive and scene-defining. Use them when they support scale,
9
- weather, mood, navigation, or gameplay.
8
+ Cloud quality comes from density organization, lighting, and temporal stability—not from increasing march steps over unstructured noise.
10
9
 
11
- Read [references/volumetric-clouds.md](references/volumetric-clouds.md) for
12
- density, lighting, reconstruction, and budget controls.
10
+ ## System order
13
11
 
14
- ## Build order
12
+ 1. Define the cloud volume and layer bounds.
13
+ 2. Generate or source weather, base-shape, detail, and turbulence fields.
14
+ 3. Build a density function with vertical and weather profiles.
15
+ 4. Raymarch only the bounded occupied segment.
16
+ 5. Integrate transmittance and lighting front-to-back.
17
+ 6. Reconstruct low-resolution output temporally.
18
+ 7. Project a separate low-cost cloud-shadow solution.
15
19
 
16
- 1. Define cloud role, altitude, coverage, wind, lighting, and performance tier.
17
- 2. Create a weather map for coverage, type, height, and erosion.
18
- 3. Raymarch inside bounded volumes or layers.
19
- 4. Add lighting, phase response, self-shadow approximation, and silver lining.
20
- 5. Add temporal reconstruction only after single-frame clouds are inspectable.
21
- 6. Expose debug views for weather, density, steps, lighting, history, and shadow.
20
+ Read [references/volumetric-clouds.md](references/volumetric-clouds.md) before implementing or auditing the cloud system.
22
21
 
23
- ## Rules
22
+ ## Required controls
24
23
 
25
- - Bound raymarch distance and step count.
26
- - Keep quality tiers explicit.
27
- - Do not hide poor terrain or lighting behind cloud opacity.
28
- - Keep wind and cloud evolution deterministic.
29
- - Validate ghosting, shimmer, and camera motion.
24
+ - coverage, cloud type, precipitation, and anvil bias;
25
+ - base/top altitude and vertical density profile;
26
+ - shape/detail scales and erosion;
27
+ - wind for each field;
28
+ - primary step count, light step count, and empty-space policy;
29
+ - history weight and disocclusion threshold;
30
+ - cloud-shadow extent, resolution, and update rate.
31
+
32
+ ## Failure conditions
33
+
34
+ - density is only `fbm(position)`;
35
+ - the raymarch traverses the full camera range;
36
+ - detail noise adds density instead of eroding shaped masses;
37
+ - temporal history is accepted across disocclusion;
38
+ - shadows use the full beauty raymarch;
39
+ - every cloud layer shares the same wind and density profile.
40
+
41
+ ## Routing boundary
42
+
43
+ Use `$genex-threejs-atmosphere-aerial-perspective` for molecular/aerosol scattering
44
+ without weather density. This skill owns weather-shaped cloud volumes,
45
+ reconstruction, cloud lighting, and cloud shadows.