@genex-ai/cli-demo 0.93.0 → 0.94.0-dev.249
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/index.js +26 -5
- package/package.json +1 -1
- package/templates/skills/genex-ai-model/SKILL.md +3 -2
- package/templates/skills/genex-ai-skybox/SKILL.md +4 -4
- package/templates/skills/genex-ai-texture/SKILL.md +1 -1
- package/templates/skills/genex-ai-video/SKILL.md +1 -1
- package/templates/skills/genex-game-director/SKILL.md +321 -411
- package/templates/skills/genex-game-director/references/design-contract.md +130 -179
- package/templates/skills/genex-game-director/references/routing-map.md +242 -362
- package/templates/skills/genex-getting-started/SKILL.md +2 -2
- package/templates/skills/genex-threejs-exposure-color-grading/SKILL.md +3 -7
- package/templates/skills/genex-threejs-multiplayer/SKILL.md +19 -2
- package/templates/skills/genex-threejs-procedural-assets/SKILL.md +112 -0
- package/templates/skills/genex-threejs-procedural-materials/SKILL.md +3 -7
- package/templates/skills/genex-threejs-procedural-vfx/SKILL.md +6 -11
- package/templates/skills/genex-threejs-shadow-systems/SKILL.md +2 -3
- package/templates/skills/genex-threejs-visual-validation/SKILL.md +0 -4
- package/templates/skills/genex-updates/SKILL.md +1 -1
- package/templates/skills/genex-threejs-atmosphere-aerial-perspective/SKILL.md +0 -46
- package/templates/skills/genex-threejs-atmosphere-aerial-perspective/references/atmosphere.md +0 -213
- package/templates/skills/genex-threejs-bloom/SKILL.md +0 -44
- package/templates/skills/genex-threejs-bloom/references/bloom.md +0 -187
- package/templates/skills/genex-threejs-exposure-color-grading/references/exposure-grading.md +0 -205
- package/templates/skills/genex-threejs-game-content/SKILL.md +0 -198
- package/templates/skills/genex-threejs-game-content/references/content-tables.md +0 -269
- package/templates/skills/genex-threejs-image-pipeline/SKILL.md +0 -56
- package/templates/skills/genex-threejs-image-pipeline/references/image-pipeline.md +0 -197
- package/templates/skills/genex-threejs-lighting-design/SKILL.md +0 -144
- package/templates/skills/genex-threejs-lighting-design/references/light-recipes.md +0 -137
- package/templates/skills/genex-threejs-open-world/SKILL.md +0 -149
- package/templates/skills/genex-threejs-open-world/references/terrain-streaming.md +0 -215
- package/templates/skills/genex-threejs-precipitation-surfaces/SKILL.md +0 -59
- package/templates/skills/genex-threejs-precipitation-surfaces/references/precipitation-surfaces.md +0 -181
- package/templates/skills/genex-threejs-procedural-architecture/SKILL.md +0 -50
- package/templates/skills/genex-threejs-procedural-architecture/references/architecture-systems.md +0 -509
- package/templates/skills/genex-threejs-procedural-fields/SKILL.md +0 -61
- package/templates/skills/genex-threejs-procedural-fields/references/field-systems.md +0 -232
- package/templates/skills/genex-threejs-procedural-geometry/SKILL.md +0 -39
- package/templates/skills/genex-threejs-procedural-geometry/references/mesh-systems.md +0 -202
- package/templates/skills/genex-threejs-procedural-materials/references/material-systems.md +0 -198
- package/templates/skills/genex-threejs-procedural-planets/SKILL.md +0 -48
- package/templates/skills/genex-threejs-procedural-planets/references/planet-systems.md +0 -498
- package/templates/skills/genex-threejs-procedural-vegetation/SKILL.md +0 -52
- package/templates/skills/genex-threejs-procedural-vegetation/references/vegetation-systems.md +0 -314
- package/templates/skills/genex-threejs-procedural-vfx/references/vfx-systems.md +0 -218
- package/templates/skills/genex-threejs-raymarched-space-effects/SKILL.md +0 -37
- package/templates/skills/genex-threejs-raymarched-space-effects/references/space-effects.md +0 -194
- package/templates/skills/genex-threejs-screen-space-ambient-occlusion/SKILL.md +0 -35
- package/templates/skills/genex-threejs-screen-space-ambient-occlusion/references/ambient-occlusion.md +0 -441
- package/templates/skills/genex-threejs-spectral-ocean/SKILL.md +0 -52
- package/templates/skills/genex-threejs-spectral-ocean/references/spectral-ocean.md +0 -473
- package/templates/skills/genex-threejs-temporal-surfaces/SKILL.md +0 -41
- package/templates/skills/genex-threejs-temporal-surfaces/references/temporal-surfaces.md +0 -207
- package/templates/skills/genex-threejs-visual-validation/references/visual-validation.md +0 -427
- package/templates/skills/genex-threejs-volumetric-clouds/SKILL.md +0 -49
- package/templates/skills/genex-threejs-volumetric-clouds/references/volumetric-clouds.md +0 -579
- package/templates/skills/genex-threejs-water-optics/SKILL.md +0 -57
- package/templates/skills/genex-threejs-water-optics/references/water-optics.md +0 -195
package/templates/skills/genex-threejs-precipitation-surfaces/references/precipitation-surfaces.md
DELETED
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
# Precipitation Surface Systems
|
|
2
|
-
|
|
3
|
-
Precipitation reads as real only when particles, surface masks, normals,
|
|
4
|
-
roughness, and impact residue share the same event state. The following
|
|
5
|
-
contracts describe two reusable families: snow accumulation and wet rain
|
|
6
|
-
puddles.
|
|
7
|
-
|
|
8
|
-
## Contents
|
|
9
|
-
|
|
10
|
-
- Weather state contract
|
|
11
|
-
- Wrapped precipitation volume
|
|
12
|
-
- Snow accumulation contract
|
|
13
|
-
- Object snow capping
|
|
14
|
-
- Wet puddle contract
|
|
15
|
-
- Rain streaks and splashes
|
|
16
|
-
- Debug outputs
|
|
17
|
-
- Boundaries and failure modes
|
|
18
|
-
|
|
19
|
-
## Weather state contract
|
|
20
|
-
|
|
21
|
-
Use a small shared state object for weather systems. The state is passed by
|
|
22
|
-
reference into both particles and surfaces.
|
|
23
|
-
|
|
24
|
-
```js
|
|
25
|
-
const weather = {
|
|
26
|
-
uTime: { value: 0 },
|
|
27
|
-
uWind: { value: new THREE.Vector3(1.2, 0, 0.5) },
|
|
28
|
-
uProgress: { value: 0 },
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
function updateWeather(delta, target) {
|
|
32
|
-
weather.uTime.value += delta;
|
|
33
|
-
weather.uProgress.value = THREE.MathUtils.damp(
|
|
34
|
-
weather.uProgress.value,
|
|
35
|
-
target,
|
|
36
|
-
0.9,
|
|
37
|
-
delta,
|
|
38
|
-
);
|
|
39
|
-
}
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Do not give rain particles one clock and puddle ripples another. Do not sample
|
|
43
|
-
wind in screen space for particles and world space for surfaces. The wind vector
|
|
44
|
-
is horizontal and is interpreted as world units per second for moving
|
|
45
|
-
precipitation, while scalar progress controls wetness or coverage.
|
|
46
|
-
|
|
47
|
-
## Wrapped precipitation volume
|
|
48
|
-
|
|
49
|
-
A camera-centered volume avoids finite emitter edges. Each instance stores a
|
|
50
|
-
normalized spawn point and a random seed. The vertex shader turns that into a
|
|
51
|
-
world position and wraps all axes with `mod`.
|
|
52
|
-
|
|
53
|
-
```glsl
|
|
54
|
-
vec3 origin = uCameraPos - vec3(vol.x * 0.5, vol.y * 0.4, vol.z * 0.5);
|
|
55
|
-
float speed = uSpeed * (0.6 + 0.7 * aRand);
|
|
56
|
-
vec3 base = aSeed * vol;
|
|
57
|
-
vec3 disp = vec3(uWind.x, -speed, uWind.z) * uTime + sway;
|
|
58
|
-
vec3 pos = mod(base + disp - origin, vol) + origin;
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
For snow, use soft round camera-facing billboards with opacity around `0.9`,
|
|
62
|
-
flake radius around `0.07`, speed around `3.2`, and a horizontal sway near
|
|
63
|
-
`0.5`. For rain, use narrow vertical or uneven-capsule billboards and a faster
|
|
64
|
-
fall speed, commonly around `5` world units per second in an inspection-scale
|
|
65
|
-
scene.
|
|
66
|
-
|
|
67
|
-
## Snow accumulation contract
|
|
68
|
-
|
|
69
|
-
Ground snow needs one height function. The same function displaces vertices and
|
|
70
|
-
feeds finite-difference normals.
|
|
71
|
-
|
|
72
|
-
```glsl
|
|
73
|
-
float snowMaskAt(vec2 worldXZ) {
|
|
74
|
-
vec2 p = worldXZ * uSnowScale + uSnowSeed;
|
|
75
|
-
float n = fbm(p) * 0.5 + 0.5;
|
|
76
|
-
float threshold = 1.0 - uSnowCoverage;
|
|
77
|
-
return smoothstep(threshold - uSnowEdge, threshold + uSnowEdge, n);
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
float snowHeightAt(vec2 worldXZ) {
|
|
81
|
-
float mask = snowMaskAt(worldXZ);
|
|
82
|
-
float drift = fbm(worldXZ * uSnowBumpScale) * 0.5 + 0.5;
|
|
83
|
-
float h = mask * (1.0 - 0.4 * uSnowBumpStrength +
|
|
84
|
-
0.4 * uSnowBumpStrength * drift);
|
|
85
|
-
vec2 edge = smoothstep(10.0, 8.0, abs(worldXZ));
|
|
86
|
-
return uSnowDepth * h * edge.x * edge.y;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
vec3 groundSurfaceNormal(vec2 worldXZ) {
|
|
90
|
-
float e = 0.08;
|
|
91
|
-
float h0 = snowHeightAt(worldXZ);
|
|
92
|
-
float hx = snowHeightAt(worldXZ + vec2(e, 0.0));
|
|
93
|
-
float hz = snowHeightAt(worldXZ + vec2(0.0, e));
|
|
94
|
-
vec2 grad = vec2(hx - h0, hz - h0) / e;
|
|
95
|
-
return normalize(vec3(-grad.x, 1.0, -grad.y));
|
|
96
|
-
}
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
The snow material response should override albedo toward a cool white, push
|
|
100
|
-
roughness to roughly `0.82`, and add sparse sparkle only inside the snow mask.
|
|
101
|
-
The sparkle is a material response, not a separate particle layer.
|
|
102
|
-
|
|
103
|
-
## Object snow capping
|
|
104
|
-
|
|
105
|
-
Object snow must be model-locked. Compute a world-to-model matrix for the host
|
|
106
|
-
object and sample coverage in that coordinate space so moving or rotating the
|
|
107
|
-
object does not slide the snow pattern.
|
|
108
|
-
|
|
109
|
-
```glsl
|
|
110
|
-
float snowAccumAt(vec3 worldNormal, vec2 modelXZ) {
|
|
111
|
-
float up = clamp(worldNormal.y, 0.0, 1.0);
|
|
112
|
-
float top = smoothstep(uSnowFlatThreshold, 1.0, up);
|
|
113
|
-
return top * snowCoverageMask(modelXZ);
|
|
114
|
-
}
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Typical controls are `uSnowFlatThreshold = 0.35`, `uSnowThickness = 0.06`,
|
|
118
|
-
`uSnowCoverage = 0.7`, and `uSnowEdge = 0.15`. Displace along the object normal
|
|
119
|
-
but convert from world units to local units using the mapped normal length.
|
|
120
|
-
|
|
121
|
-
## Wet puddle contract
|
|
122
|
-
|
|
123
|
-
Wet asphalt is a material transition driven by rain progress. Use separate
|
|
124
|
-
progress bands: roughness changes early, ripple normals arrive as the rain
|
|
125
|
-
becomes heavy.
|
|
126
|
-
|
|
127
|
-
```glsl
|
|
128
|
-
float roughnessProgress = smoothstep(0.0, 0.75, uRainFactor);
|
|
129
|
-
float normalProgress = smoothstep(0.75, 1.0, uRainFactor);
|
|
130
|
-
float puddleNoise = getPuddle(vPosition.xy * 15.0);
|
|
131
|
-
float puddleMask = smoothstep(0.0, 1.0, puddleNoise) * normalProgress;
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
The puddle roughness is intentionally collapsed toward the `0.0..0.1` range
|
|
135
|
-
inside the mask. Ripple normals are analytic: every local cell emits expanding
|
|
136
|
-
rings with finite-difference slope estimation. Keep the ripple normal separate
|
|
137
|
-
from the static asphalt normal until the final normal handoff.
|
|
138
|
-
|
|
139
|
-
## Rain streaks and splashes
|
|
140
|
-
|
|
141
|
-
Rain streaks can be instanced quads. Their fragment shape may use an uneven
|
|
142
|
-
capsule SDF and alpha around `0.1 * rainProgress`. Splash placement should use
|
|
143
|
-
surface sampling weighted by upward normals.
|
|
144
|
-
|
|
145
|
-
```js
|
|
146
|
-
const skyWeight = normal.dot(new THREE.Vector3(0, 1, 0)) >= 0 ? 1 : 0;
|
|
147
|
-
geometry.setAttribute("skyWeight", new THREE.BufferAttribute(weights, 1));
|
|
148
|
-
sampler.setWeightAttribute("skyWeight");
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
Each splash instance owns a progress attribute. A flipbook shader maps progress
|
|
152
|
-
to a tile in a `4 x 5` atlas, fades by rain progress, and uses additive
|
|
153
|
-
blending. The splash mesh should face the camera around Y.
|
|
154
|
-
|
|
155
|
-
## Debug outputs
|
|
156
|
-
|
|
157
|
-
Expose at least:
|
|
158
|
-
|
|
159
|
-
- `final`: complete weather and surface response;
|
|
160
|
-
- `mask`: snow or puddle coverage only;
|
|
161
|
-
- `normals`: accumulated snow normal or ripple normal;
|
|
162
|
-
- `particles`: precipitation density and fall volume;
|
|
163
|
-
- `progress`: shared rain or snow envelope.
|
|
164
|
-
|
|
165
|
-
Diagnostics should report active instance count, coverage, and whether the
|
|
166
|
-
surface response is reading the same time/wind uniforms as particles.
|
|
167
|
-
|
|
168
|
-
## Boundaries and failure modes
|
|
169
|
-
|
|
170
|
-
Use a water-volume skill when the system needs refraction through a bounded
|
|
171
|
-
water body, caustics, or Beer-Lambert thickness. Use a general VFX skill for
|
|
172
|
-
non-weather particles. Use a screen-space temporal-surface skill for touch
|
|
173
|
-
history, not for world-space wetness.
|
|
174
|
-
|
|
175
|
-
Known failure modes:
|
|
176
|
-
|
|
177
|
-
- snow silhouettes rise but normals stay flat;
|
|
178
|
-
- object snow uses world coordinates and slides under animation;
|
|
179
|
-
- puddle masks are independent of roughness and normal changes;
|
|
180
|
-
- splashes sample all triangles and appear under objects;
|
|
181
|
-
- rain progress affects particles but not the material, or the reverse.
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: genex-threejs-procedural-architecture
|
|
3
|
-
description: Create procedural architecture for Genex Three.js games. Use for buildings, modular kits, facade grammars, exposed-edge analysis, bay systems, roofs, arches, ornaments, city blocks, collision proxies, material-slot compilation, and readable architecture at gameplay distance.
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Genex Three.js Procedural Architecture
|
|
7
|
-
|
|
8
|
-
Separate design planning from mesh emission. A building generator should produce an inspectable plan before it produces triangles.
|
|
9
|
-
|
|
10
|
-
## Required architecture
|
|
11
|
-
|
|
12
|
-
```text
|
|
13
|
-
settings
|
|
14
|
-
→ mass grammar
|
|
15
|
-
→ exposed-surface graph
|
|
16
|
-
→ façade/roof placements
|
|
17
|
-
→ module registry
|
|
18
|
-
→ material-slot mesh writer
|
|
19
|
-
→ geometries
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
Read [references/architecture-systems.md](references/architecture-systems.md) before implementing the generator.
|
|
23
|
-
|
|
24
|
-
## Rules
|
|
25
|
-
|
|
26
|
-
- Massing, façade rhythm, and detail modules are separate layers.
|
|
27
|
-
- Resolve exposed edges before façade placement. Do not decorate hidden internal faces.
|
|
28
|
-
- Modules own semantic anchors and construction depth, not global building coordinates.
|
|
29
|
-
- Compile by material slot to reduce draw calls without destroying material separation.
|
|
30
|
-
- Preserve real dimensions for floor height, bay width, trim projection, and texture density.
|
|
31
|
-
- Randomness may select among valid designs; it must not repair invalid geometry.
|
|
32
|
-
- Provide topology, façade ownership, material/geometry, and shadow diagnostics
|
|
33
|
-
appropriate to the renderer path.
|
|
34
|
-
|
|
35
|
-
## Acceptance
|
|
36
|
-
|
|
37
|
-
The generated building must survive:
|
|
38
|
-
|
|
39
|
-
- silhouette-only view;
|
|
40
|
-
- flat untextured material;
|
|
41
|
-
- grazing light;
|
|
42
|
-
- close inspection of corners and roof transitions;
|
|
43
|
-
- seed variation without broken bays, overlapping ownership, or floating ornament;
|
|
44
|
-
- triangle and module-count reporting.
|
|
45
|
-
|
|
46
|
-
## Routing boundary
|
|
47
|
-
|
|
48
|
-
Use `$genex-threejs-procedural-geometry` for a reusable profile, sweep, ring, or mesh
|
|
49
|
-
writer without a building grammar. This skill owns massing, façade semantics,
|
|
50
|
-
architectural modules, and building-plan compilation.
|