@genex-ai/cli-demo 0.7.0 → 0.10.0

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 (28) hide show
  1. package/README.md +13 -12
  2. package/dist/index.js +410 -154
  3. package/package.json +10 -11
  4. package/templates/README.md +8 -7
  5. package/templates/skills/genex-ai-model/SKILL.md +5 -5
  6. package/templates/skills/genex-ai-sfx/SKILL.md +1 -1
  7. package/templates/skills/genex-ai-skybox/SKILL.md +2 -2
  8. package/templates/skills/genex-ai-texture/SKILL.md +1 -1
  9. package/templates/skills/genex-getting-started/SKILL.md +10 -6
  10. package/templates/skills/genex-threejs-embed-auth/SKILL.md +174 -0
  11. package/templates/skills/genex-threejs-multiplayer/SKILL.md +193 -100
  12. package/templates/skills/genex-threejs-multiplayer/references/genre-recipes.md +115 -0
  13. package/templates/skills/genex-threejs-multiplayer/references/realtime-patterns.md +138 -123
  14. package/templates/skills/genex-threejs-precipitation-surfaces/SKILL.md +59 -0
  15. package/templates/skills/genex-threejs-precipitation-surfaces/references/precipitation-surfaces.md +181 -0
  16. package/templates/skills/genex-threejs-procedural-architecture/SKILL.md +2 -1
  17. package/templates/skills/genex-threejs-procedural-architecture/references/architecture-systems.md +1 -1
  18. package/templates/skills/genex-threejs-procedural-fields/SKILL.md +0 -5
  19. package/templates/skills/genex-threejs-procedural-geometry/SKILL.md +0 -5
  20. package/templates/skills/genex-threejs-procedural-materials/SKILL.md +2 -17
  21. package/templates/skills/genex-threejs-procedural-vegetation/SKILL.md +11 -1
  22. package/templates/skills/genex-threejs-procedural-vfx/SKILL.md +3 -1
  23. package/templates/skills/genex-threejs-shadow-systems/SKILL.md +0 -5
  24. package/templates/skills/genex-threejs-skill-router/SKILL.md +10 -5
  25. package/templates/skills/genex-threejs-skill-router/references/routing-map.md +9 -6
  26. package/templates/skills/genex-threejs-spectral-ocean/SKILL.md +11 -1
  27. package/templates/skills/genex-threejs-temporal-surfaces/SKILL.md +3 -1
  28. package/templates/skills/genex-threejs-water-optics/SKILL.md +14 -2
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: genex-threejs-procedural-vegetation
3
- description: Generate procedural vegetation for Genex Three.js games. Use for trees, trunks, roots, recursive branches, canopies, leaf cards, grass clumps, species presets, deterministic variation, growth forces, wind deformation, and vegetation that supports navigation or scene readability.
3
+ description: Generate procedural vegetation for Genex Three.js games. Use for trees, trunks, roots, recursive branches, canopies, leaf cards, stylized meadow grass, GPU-computed grass fields, grass clumps, species presets, deterministic variation, growth forces, rooted blade and leaf wind, wind deformation, and vegetation that supports navigation or scene readability.
4
4
  ---
5
5
 
6
6
  # Genex Three.js Procedural Vegetation
@@ -24,10 +24,20 @@ Represent a plant as a growth hierarchy plus rendering adaptations. Do not model
24
24
 
25
25
  Read [references/vegetation-systems.md](references/vegetation-systems.md) and preserve its preset, continuation, child-placement, leaf, material, wind, and composition contracts before tuning.
26
26
 
27
+ ## Grass fields
28
+
29
+ Grass is either instanced blade clusters (per-instance origin, facing, and
30
+ height, with circular-arc rooted wind that bends blades from the ground up) or
31
+ GPU-generated blade fields (blades written in render targets with Voronoi clump
32
+ variation, folded blade curvature, and distance-based density falloff). Both
33
+ keep terrain height and clump identity as shared causes; scattering blades with
34
+ uniform randomness produces lawn noise, not a meadow.
35
+
27
36
  ## Visual failure conditions
28
37
 
29
38
  - branches form visible helices;
30
39
  - every child emerges at the same relative height;
40
+ - dense grass ignores terrain height or clump-level variation;
31
41
  - bark texture scale changes with branch radius;
32
42
  - leaves reveal flat card normals under rotation;
33
43
  - leaf wind moves card roots instead of remaining anchored;
@@ -35,5 +35,7 @@ spark/debris pools, HDR hierarchy, and implementation limits.
35
35
  ## Routing boundary
36
36
 
37
37
  Use `$genex-threejs-temporal-surfaces` only for the screen-space
38
- frost/touch-history pipeline. Keep ship-space plasma, generated wakes, sparks,
38
+ frost/touch-history pipeline. Use `$genex-threejs-precipitation-surfaces` for
39
+ falling rain or snow, splash flipbooks, and weather events that alter ground
40
+ materials. Keep ship-space plasma, generated wakes, sparks,
39
41
  and pooled debris in this skill.
@@ -19,11 +19,6 @@ Use a single shadow map only when its receiver region is genuinely bounded. For
19
19
 
20
20
  Read [references/shadow-systems.md](references/shadow-systems.md) before implementing a large-world directional light.
21
21
 
22
- Read the
23
- [cached shadow clipmaps](../threejs-procedural-architecture/examples/authored-financial-tower/shadow-clipmaps.js)
24
- for three light-space square levels, per-level texel snapping, containment
25
- cross-fades, cached coarse updates, scaled bias, and unshadowed outside weight.
26
-
27
22
  ## Failure conditions
28
23
 
29
24
  - projection centers move by fractions of a texel;
@@ -20,13 +20,14 @@ map, execution order, and acceptance gate.
20
20
  | reusable scalar/vector fields, domain warping, causal masks, procedural normals | `$genex-threejs-procedural-fields` |
21
21
  | atlas-filtered blocks, planetary surfaces, terrain wetness, lava/emissive procedural surfaces, authored frame PBR, specular AA | `$genex-threejs-procedural-materials` |
22
22
  | sculpted rails/frames, branch rings, semantic mesh writers, material groups | `$genex-threejs-procedural-geometry` |
23
- | trees, stylized grass, branching organisms, roots, foliage, rooted wind deformation | `$genex-threejs-procedural-vegetation` |
23
+ | trees, stylized grass, GPU-computed grass fields, branching organisms, roots, foliage, rooted wind deformation | `$genex-threejs-procedural-vegetation` |
24
24
  | buildings, façade grammars, profiles, ornaments, modular mesh writers | `$genex-threejs-procedural-architecture` |
25
25
  | planets, terrain, craters, biome fields, coastlines, spherical detail | `$genex-threejs-procedural-planets` |
26
26
  | sky scattering, planetary shells, depth-based aerial perspective | `$genex-threejs-atmosphere-aerial-perspective` |
27
27
  | weather-driven raymarched clouds and cloud shadows | `$genex-threejs-volumetric-clouds` |
28
28
  | FFT oceans, hybrid FFT/Gerstner clear water, stylized above/below ocean optics, spectral cascades, choppy derivatives, Jacobian whitecaps | `$genex-threejs-spectral-ocean` |
29
29
  | authored analytic waves, bounded heightfield pools, object ripples, differential-area caustics, ray-traced pool volume optics, shared normals, heuristic refraction, fallback absorption, crest foam | `$genex-threejs-water-optics` |
30
+ | falling snow, snow accumulation, model snow caps, wet asphalt puddles, procedural ripple normals, splash flipbooks, rain streaks, shared weather envelopes, surface wetness | `$genex-threejs-precipitation-surfaces` |
30
31
  | curved-ray black holes, accretion disks, wormholes | `$genex-threejs-raymarched-space-effects` |
31
32
  | particles, trails, plasma, shockwaves, layered event effects | `$genex-threejs-procedural-vfx` |
32
33
  | accumulated screen frost, touch clearing, reduced blur, and refraction masks | `$genex-threejs-temporal-surfaces` |
@@ -36,11 +37,13 @@ map, execution order, and acceptance gate.
36
37
  | eye adaptation, tone mapping, LUT grading, output color | `$genex-threejs-exposure-color-grading` |
37
38
  | shared depth/normal/velocity ownership and multi-pass ordering | `$genex-threejs-image-pipeline` |
38
39
  | fixed-view diagnostics, seed sweeps, temporal and budget evidence | `$genex-threejs-visual-validation` |
39
- | realtime multiplayer: movement sync, shared state, presence, shots/emotes, persistence | `$genex-threejs-multiplayer` |
40
+ | realtime multiplayer: movement sync, a shared ball/NPC, host-run scores/enemies, shots/emotes, persistence | `$genex-threejs-multiplayer` |
40
41
 
41
42
  **Multiplayer is mandatory routing:** if the game has 2+ players sharing a world, loading
42
- `$genex-threejs-multiplayer` is **required** before any networking code — the relay does no
43
- interpolation/prediction, and that skill is how you add them.
43
+ `$genex-threejs-multiplayer` is **required** before any networking code — the SDK auto-smooths
44
+ remote players **and shared objects**, and gives you server-enforced object ownership (a ball) and
45
+ a room `host` (scores, enemies). That skill covers the rules that keep it smooth and its per-genre
46
+ recipes (sports/ball, shooter, co-op).
44
47
 
45
48
  ## Real (AI-generated) assets — `npx genex` commands
46
49
 
@@ -48,7 +51,9 @@ When the user wants a **specific, recognizable asset** (a named object, a descri
48
51
  sky, a particular sound or surface) rather than something authored in code, generate
49
52
  it with an `npx genex` command (run inside the project, where the `@genex-ai/cli-demo`
50
53
  dev dependency makes `genex` resolve to the right CLI). Each drops a real file into
51
- `./assets/` (committed by `npx genex publish`), and its skill has the exact Three.js
54
+ `public/assets/<kind>/` so it ships with the built game load it at runtime as
55
+ `./assets/...` (the `public/` prefix is stripped when served; a bare `./assets/` dir
56
+ would be dropped from the production build). Each skill has the exact Three.js
52
57
  loader code.
53
58
 
54
59
  | Work needed | Generate with | Skill |
@@ -18,7 +18,7 @@ Three.js release or branch, and do not blindly copy demo architecture.
18
18
  1. Define the game contract: player verb, win/interaction loop, target device,
19
19
  camera distance, scene scale, motion, and frame budget.
20
20
  2. Select the minimum scene-generation skills: geometry, materials, vegetation,
21
- architecture, planets, water, clouds, or VFX.
21
+ architecture, planets, water, precipitation, clouds, or VFX.
22
22
  3. Add camera direction when framing, controls, transitions, or scale perception
23
23
  affect play.
24
24
  4. Add procedural animation when object motion needs authored phases,
@@ -54,8 +54,11 @@ publishing or multiplayer, inspect the project first. Prefer clean boundaries:
54
54
 
55
55
  **Multiplayer is mandatory routing.** If the game has 2+ players sharing a world,
56
56
  load `$genex-threejs-multiplayer` **before writing any networking code** — it is not
57
- optional. The `@genex-ai/multiplayer` relay syncs `me`/`shared` but does **no**
58
- physics, prediction, or interpolation; that skill is how you add interpolation for
59
- remote players, prediction for the local player, config wiring, and (for save-state
60
- games) the persistent-world API. Use only the APIs that skill documents do not
61
- invent transport methods.
57
+ optional. The `@genex-ai/multiplayer` relay syncs `me`/`shared`/`objects`; the **SDK
58
+ auto-smooths remote players AND shared objects** for you (do not write your own
59
+ interpolation). It gives you server-enforced primitives `objects` (one owner per ball/
60
+ NPC, claimed on contact) and a room `host` (single writer of scores, single simulator of
61
+ enemies). That skill covers the rules that keep it smooth (draw `state` directly, render
62
+ yourself and objects you own from a local object, quaternion rotation, `stateRaw` for
63
+ hit-tests), the per-genre recipes (sports/ball, shooter, co-op), config wiring, and the
64
+ persistent-world API. Use only the APIs that skill documents — do not invent transport methods.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: genex-threejs-spectral-ocean
3
- description: Build large procedural oceans for Genex Three.js games. Use for FFT-style wave spectra, multi-cascade wave bands, choppy displacement, derivatives, whitecaps, temporal foam, ocean shading, camera-scale transitions, and GPU-budgeted open-water scenes.
3
+ description: Build large procedural oceans for Genex Three.js games. Use for FFT-style wave spectra, multi-cascade wave bands, hybrid FFT plus Gerstner clear water, stylized above/below-surface ocean optics, choppy displacement, derivatives, Jacobian whitecaps, temporal foam, underwater absorption, crest scatter, ocean shading, camera-scale transitions, and GPU-budgeted open-water scenes.
4
4
  ---
5
5
 
6
6
  # Genex Three.js Spectral Ocean
@@ -22,6 +22,16 @@ Treat an ocean as a sampled stochastic wave field with explicit frequency-space
22
22
 
23
23
  Read [references/spectral-ocean.md](references/spectral-ocean.md) before implementing or auditing a spectral ocean.
24
24
 
25
+ ## Hybrid and stylized variants
26
+
27
+ For clear shallow water, a hybrid ocean may add a few authored Gerstner swells on
28
+ top of the FFT cascades — never instead of them — with Beer–Lambert depth color,
29
+ sand-bed caustics, and sharp sun highlights. A stylized ocean meant to be seen
30
+ from above and below can drive color from height gradients, add sun-path glints
31
+ and crest scatter, and composite an underwater Beer–Lambert tint from scene
32
+ depth. Both variants keep the spectral core, its derivatives, and Jacobian foam
33
+ as the single source of surface truth.
34
+
25
35
  ## Non-negotiable gates
26
36
 
27
37
  - Require a power-of-two grid and a passing FFT impulse/frequency test.
@@ -36,4 +36,6 @@ coupling, and implementation defects that must be corrected.
36
36
  ## Routing boundary
37
37
 
38
38
  Use `$genex-threejs-procedural-vfx` for world- or object-space residue, particles, and
39
- dissolves. This skill owns screen-space persistent history and its composite.
39
+ dissolves. Use `$genex-threejs-precipitation-surfaces` for rain wetness, puddles,
40
+ snow accumulation, and weather-surface coupling in world space. This skill owns
41
+ screen-space persistent history and its composite.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: genex-threejs-water-optics
3
- description: Build analytic water surfaces for Genex Three.js games. Use for rivers, pools, lakes, shoreline water, shared wave displacement, normals, Fresnel, refraction, absorption, crest foam, underwater color, and cheaper water than a full spectral ocean.
3
+ description: Build analytic water surfaces for Genex Three.js games. Use for rivers, pools, lakes, shoreline water, bounded heightfield pool simulation, object-driven ripples, differential-area caustics, ray-traced pool volume optics, shared wave displacement, normals, Fresnel, refraction, absorption, crest foam, underwater color, and cheaper water than a full spectral ocean.
4
4
  ---
5
5
 
6
6
  # Genex Three.js Water Optics
@@ -25,6 +25,16 @@ Read [references/water-optics.md](references/water-optics.md)
25
25
  for the exact five-wave displaced ocean, six-band normal-only water, optical
26
26
  hierarchy, and the limits that distinguish both from the spectral-ocean skill.
27
27
 
28
+ ## Bounded pool volumes
29
+
30
+ A bounded pool couples a small RGBA heightfield simulation (height and velocity,
31
+ with local drop injection and moving-object displacement) with the optical
32
+ layer: normals derive from the simulated heights and feed differential-area
33
+ caustics on the pool floor, and the water volume is shaded by ray-tracing
34
+ against the pool bounds. Keep the simulation, the normal derivation, and the
35
+ caustics reading the same field — a caustic pattern detached from the simulated
36
+ surface is a failure condition below.
37
+
28
38
  ## Failure conditions
29
39
 
30
40
  - normal texture motion does not agree with displaced crests;
@@ -40,6 +50,8 @@ hierarchy, and the limits that distinguish both from the spectral-ocean skill.
40
50
  ## Routing boundary
41
51
 
42
52
  Use `$genex-threejs-spectral-ocean` for stochastic directional spectra, FFT
43
- cascades, Jacobian breaking, and persistent ocean foam. This skill owns
53
+ cascades, Jacobian breaking, and persistent ocean foam. Use
54
+ `$genex-threejs-precipitation-surfaces` for rain-driven puddle wetness, ripple
55
+ masks, and weather-coupled splashes on ground surfaces. This skill owns
44
56
  authored analytic waves, bounded heightfield simulation, ray-traced
45
57
  pool-volume optics, and bounded-water optics.