@genex-ai/cli-demo 0.1.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.
- package/LICENSE +21 -0
- package/README.md +198 -0
- package/package.json +45 -0
- package/src/commands/init.ts +131 -0
- package/src/commands/publish.ts +151 -0
- package/src/config.ts +102 -0
- package/src/index.ts +238 -0
- package/src/lib/auth.ts +365 -0
- package/src/lib/copy-templates.ts +81 -0
- package/src/lib/env.ts +109 -0
- package/src/lib/project.ts +109 -0
- package/src/lib/ssh.ts +104 -0
- package/src/lib/store.ts +102 -0
- package/src/utils/colors.ts +25 -0
- package/src/utils/logger.ts +40 -0
- package/templates/README.md +19 -0
- package/templates/agents/genex-helper.md +16 -0
- package/templates/commands/genex-status.md +13 -0
- package/templates/skills/genex-getting-started/SKILL.md +41 -0
- package/templates/skills/genex-threejs-atmosphere-aerial-perspective/SKILL.md +30 -0
- package/templates/skills/genex-threejs-atmosphere-aerial-perspective/references/atmosphere.md +29 -0
- package/templates/skills/genex-threejs-bloom/SKILL.md +30 -0
- package/templates/skills/genex-threejs-bloom/references/bloom.md +29 -0
- package/templates/skills/genex-threejs-camera-direction/SKILL.md +36 -0
- package/templates/skills/genex-threejs-camera-direction/references/camera-rigs.md +38 -0
- package/templates/skills/genex-threejs-exposure-color-grading/SKILL.md +30 -0
- package/templates/skills/genex-threejs-exposure-color-grading/references/exposure-grading.md +30 -0
- package/templates/skills/genex-threejs-image-pipeline/SKILL.md +30 -0
- package/templates/skills/genex-threejs-image-pipeline/references/image-pipeline.md +39 -0
- package/templates/skills/genex-threejs-procedural-animation/SKILL.md +31 -0
- package/templates/skills/genex-threejs-procedural-animation/references/procedural-motion.md +33 -0
- package/templates/skills/genex-threejs-procedural-architecture/SKILL.md +30 -0
- package/templates/skills/genex-threejs-procedural-architecture/references/architecture-systems.md +31 -0
- package/templates/skills/genex-threejs-procedural-fields/SKILL.md +31 -0
- package/templates/skills/genex-threejs-procedural-fields/references/field-systems.md +35 -0
- package/templates/skills/genex-threejs-procedural-geometry/SKILL.md +30 -0
- package/templates/skills/genex-threejs-procedural-geometry/references/mesh-systems.md +36 -0
- package/templates/skills/genex-threejs-procedural-materials/SKILL.md +30 -0
- package/templates/skills/genex-threejs-procedural-materials/references/material-systems.md +31 -0
- package/templates/skills/genex-threejs-procedural-planets/SKILL.md +30 -0
- package/templates/skills/genex-threejs-procedural-planets/references/planet-systems.md +30 -0
- package/templates/skills/genex-threejs-procedural-vegetation/SKILL.md +32 -0
- package/templates/skills/genex-threejs-procedural-vegetation/references/vegetation-systems.md +37 -0
- package/templates/skills/genex-threejs-procedural-vfx/SKILL.md +31 -0
- package/templates/skills/genex-threejs-procedural-vfx/references/vfx-systems.md +30 -0
- package/templates/skills/genex-threejs-raymarched-space-effects/SKILL.md +30 -0
- package/templates/skills/genex-threejs-raymarched-space-effects/references/space-effects.md +30 -0
- package/templates/skills/genex-threejs-screen-space-ambient-occlusion/SKILL.md +29 -0
- package/templates/skills/genex-threejs-screen-space-ambient-occlusion/references/ambient-occlusion.md +29 -0
- package/templates/skills/genex-threejs-shadow-systems/SKILL.md +30 -0
- package/templates/skills/genex-threejs-shadow-systems/references/shadow-systems.md +30 -0
- package/templates/skills/genex-threejs-skill-router/SKILL.md +48 -0
- package/templates/skills/genex-threejs-skill-router/references/routing-map.md +53 -0
- package/templates/skills/genex-threejs-spectral-ocean/SKILL.md +30 -0
- package/templates/skills/genex-threejs-spectral-ocean/references/spectral-ocean.md +31 -0
- package/templates/skills/genex-threejs-temporal-surfaces/SKILL.md +30 -0
- package/templates/skills/genex-threejs-temporal-surfaces/references/temporal-surfaces.md +29 -0
- package/templates/skills/genex-threejs-visual-validation/SKILL.md +32 -0
- package/templates/skills/genex-threejs-visual-validation/references/visual-validation.md +42 -0
- package/templates/skills/genex-threejs-volumetric-clouds/SKILL.md +29 -0
- package/templates/skills/genex-threejs-volumetric-clouds/references/volumetric-clouds.md +30 -0
- package/templates/skills/genex-threejs-water-optics/SKILL.md +30 -0
- package/templates/skills/genex-threejs-water-optics/references/water-optics.md +29 -0
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Vegetation Systems
|
|
2
|
+
|
|
3
|
+
Use this reference for trees, plants, and grass in Genex games.
|
|
4
|
+
|
|
5
|
+
## Species definition
|
|
6
|
+
|
|
7
|
+
Declare:
|
|
8
|
+
|
|
9
|
+
- height and width range;
|
|
10
|
+
- trunk taper and bend;
|
|
11
|
+
- branch count and angles;
|
|
12
|
+
- canopy shape;
|
|
13
|
+
- leaf size and clustering;
|
|
14
|
+
- bark and leaf material identity;
|
|
15
|
+
- wind response;
|
|
16
|
+
- gameplay function such as cover, obstacle, collectible, or landmark.
|
|
17
|
+
|
|
18
|
+
## Branch hierarchy
|
|
19
|
+
|
|
20
|
+
- Emit trunk first with a stable radius curve.
|
|
21
|
+
- Spawn primary branches from height bands.
|
|
22
|
+
- Spawn secondary branches from primary branch frames.
|
|
23
|
+
- Align leaf clusters to branch direction and local light bias.
|
|
24
|
+
- Keep branch rings oriented with a stable frame to avoid twisting.
|
|
25
|
+
|
|
26
|
+
## Placement
|
|
27
|
+
|
|
28
|
+
- Use terrain slope, moisture, altitude, and gameplay zones as masks.
|
|
29
|
+
- Leave readable paths and playable spaces.
|
|
30
|
+
- Vary seed and scale without changing species identity.
|
|
31
|
+
|
|
32
|
+
## Wind
|
|
33
|
+
|
|
34
|
+
- Drive wind from a shared vector field.
|
|
35
|
+
- Use lower-frequency bend for trunk and branches.
|
|
36
|
+
- Use higher-frequency flutter for leaves.
|
|
37
|
+
- Keep wind amplitude within the silhouette promised by collision/proxy shapes.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genex-threejs-procedural-vfx
|
|
3
|
+
description: Author procedural real-time VFX for Genex Three.js games. Use for particles, trails, plasma, sparks, shockwaves, impacts, dissolving debris, ability effects, reentry wakes, event-timed visuals, effect pools, HDR emission hierarchy, and gameplay-readable spectacle.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genex Three.js Procedural VFX
|
|
7
|
+
|
|
8
|
+
VFX should make player actions legible. Build effects as timed systems with
|
|
9
|
+
budgets, not as one-off bursts.
|
|
10
|
+
|
|
11
|
+
Read [references/vfx-systems.md](references/vfx-systems.md) for event timing,
|
|
12
|
+
particles, trails, pooling, emission, and diagnostics.
|
|
13
|
+
|
|
14
|
+
## Build order
|
|
15
|
+
|
|
16
|
+
1. Define the event: cause, start, peak, decay, gameplay meaning, and interrupt
|
|
17
|
+
behavior.
|
|
18
|
+
2. Split effect layers into core shape, particles, trails, light, distortion,
|
|
19
|
+
sound hooks, and decal/debris.
|
|
20
|
+
3. Use seeded variation for repeatable runs.
|
|
21
|
+
4. Pool high-count objects and dispose temporary resources.
|
|
22
|
+
5. Keep emission intensities scene-relative.
|
|
23
|
+
6. Expose debug controls for phase, layer toggles, counts, bounds, and overdraw.
|
|
24
|
+
|
|
25
|
+
## Rules
|
|
26
|
+
|
|
27
|
+
- Do not let bloom carry the shape of the effect.
|
|
28
|
+
- Keep impact timing aligned to gameplay state.
|
|
29
|
+
- Bound particle counts and lifetimes.
|
|
30
|
+
- Use additive blending deliberately and inspect overdraw.
|
|
31
|
+
- Provide low-quality versions for dense combat or mobile browsers.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Procedural VFX
|
|
2
|
+
|
|
3
|
+
Use this reference for action effects in Genex games.
|
|
4
|
+
|
|
5
|
+
## Event timeline
|
|
6
|
+
|
|
7
|
+
- Anticipation: small cue before action when gameplay allows it.
|
|
8
|
+
- Impact: strongest shape and brightness.
|
|
9
|
+
- Decay: particles, trails, smoke, heat, or fragments.
|
|
10
|
+
- Recovery: cleanup and return to readable scene state.
|
|
11
|
+
|
|
12
|
+
## Layers
|
|
13
|
+
|
|
14
|
+
- Shape layer: shockwave, shell, beam, ring, or volume.
|
|
15
|
+
- Particle layer: sparks, embers, fragments, droplets, or dust.
|
|
16
|
+
- Trail layer: motion history or projectile path.
|
|
17
|
+
- Light layer: short-lived local light or emissive material.
|
|
18
|
+
- Surface layer: decal, scorch, foam, or dissolve mask.
|
|
19
|
+
|
|
20
|
+
## Pooling
|
|
21
|
+
|
|
22
|
+
- Preallocate repeated particles or meshes.
|
|
23
|
+
- Reuse materials and geometries.
|
|
24
|
+
- Track active counts and peak counts.
|
|
25
|
+
- Avoid per-frame allocation during dense events.
|
|
26
|
+
|
|
27
|
+
## Diagnostics
|
|
28
|
+
|
|
29
|
+
Expose layer toggles, overdraw view, bounding volumes, active counts, lifetime
|
|
30
|
+
histograms, and final/no-bloom captures.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genex-threejs-raymarched-space-effects
|
|
3
|
+
description: Build raymarched space effects for Genex Three.js games. Use for black holes, accretion disks, wormholes, curved-ray distortion, procedural star fields, bounded volumetric structures, relativistic-looking effects, and GPU effects needing numerical integration.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genex Three.js Raymarched Space Effects
|
|
7
|
+
|
|
8
|
+
Use raymarched space effects for strong authored moments. Keep the math bounded,
|
|
9
|
+
diagnosable, and tied to a game purpose.
|
|
10
|
+
|
|
11
|
+
Read [references/space-effects.md](references/space-effects.md) for curved-ray,
|
|
12
|
+
disk, wormhole, and budget patterns.
|
|
13
|
+
|
|
14
|
+
## Build order
|
|
15
|
+
|
|
16
|
+
1. Define the game role: landmark, hazard, portal, sky feature, set piece, or
|
|
17
|
+
background effect.
|
|
18
|
+
2. Choose ray domain, bounds, step count, and quality tiers.
|
|
19
|
+
3. Implement a no-distortion baseline first.
|
|
20
|
+
4. Add ray steering, density, emission, and environment lookup.
|
|
21
|
+
5. Add compositing with depth and exposure rules.
|
|
22
|
+
6. Expose debug views for steps, ray exit, density, emission, and fallback.
|
|
23
|
+
|
|
24
|
+
## Rules
|
|
25
|
+
|
|
26
|
+
- Bound every integration loop.
|
|
27
|
+
- Keep a cheaper fallback for low-end browsers.
|
|
28
|
+
- Avoid unbounded brightness that breaks exposure.
|
|
29
|
+
- Keep controls and collision separate from visual distortion.
|
|
30
|
+
- Validate camera motion and edge cases near the effect.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Space Effects
|
|
2
|
+
|
|
3
|
+
Use this reference for black holes, wormholes, and other space phenomena.
|
|
4
|
+
|
|
5
|
+
## Curved rays
|
|
6
|
+
|
|
7
|
+
- Start with a straight-ray environment lookup.
|
|
8
|
+
- Add a bounded steering function.
|
|
9
|
+
- Limit step count and maximum bend.
|
|
10
|
+
- Record whether the ray hit, escaped, or exceeded bounds.
|
|
11
|
+
|
|
12
|
+
## Accretion disks
|
|
13
|
+
|
|
14
|
+
- Use radial density and temperature bands.
|
|
15
|
+
- Add noise only as structured turbulence.
|
|
16
|
+
- Keep disk emission bounded relative to scene exposure.
|
|
17
|
+
- Allow the disk to be disabled for diagnostics.
|
|
18
|
+
|
|
19
|
+
## Wormholes and portals
|
|
20
|
+
|
|
21
|
+
- Define entry and exit transforms clearly.
|
|
22
|
+
- Separate playable teleport state from visual distortion.
|
|
23
|
+
- Provide edge masks and depth rules for compositing.
|
|
24
|
+
|
|
25
|
+
## Validation
|
|
26
|
+
|
|
27
|
+
- Capture near, design, and far distances.
|
|
28
|
+
- Check fast camera rotation.
|
|
29
|
+
- Inspect low-quality fallback.
|
|
30
|
+
- Confirm the rest of the game remains readable around the effect.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genex-threejs-screen-space-ambient-occlusion
|
|
3
|
+
description: Implement screen-space ambient occlusion for Genex Three.js games. Use for GTAO-style horizon sampling, bent normals, contact grounding, depth reconstruction, bilateral upsampling, temporal smoothing, halo diagnosis, and AO that supports readable form.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genex Three.js Screen-Space Ambient Occlusion
|
|
7
|
+
|
|
8
|
+
Use AO to ground form, not to darken the whole image. It should be measurable,
|
|
9
|
+
diagnosable, and easy to disable.
|
|
10
|
+
|
|
11
|
+
Read [references/ambient-occlusion.md](references/ambient-occlusion.md) for
|
|
12
|
+
sampling, reconstruction, filtering, and failure checks.
|
|
13
|
+
|
|
14
|
+
## Build order
|
|
15
|
+
|
|
16
|
+
1. Confirm the render pipeline owns depth and normal signals.
|
|
17
|
+
2. Choose AO resolution, sample count, radius, falloff, and quality tiers.
|
|
18
|
+
3. Reconstruct view-space position consistently.
|
|
19
|
+
4. Generate occlusion and optional bent-normal direction.
|
|
20
|
+
5. Filter with depth/normal-aware reconstruction.
|
|
21
|
+
6. Expose debug views for depth, normals, raw AO, filtered AO, and final apply.
|
|
22
|
+
|
|
23
|
+
## Rules
|
|
24
|
+
|
|
25
|
+
- Keep AO radius tied to scene scale.
|
|
26
|
+
- Avoid halos around silhouettes and thin geometry.
|
|
27
|
+
- Do not apply AO twice through materials and post-processing.
|
|
28
|
+
- Keep dynamic resolution and DPR changes safe.
|
|
29
|
+
- Validate no-AO, raw-AO, and final-AO captures.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Ambient Occlusion
|
|
2
|
+
|
|
3
|
+
Use this reference for screen-space contact grounding.
|
|
4
|
+
|
|
5
|
+
## Inputs
|
|
6
|
+
|
|
7
|
+
- Depth with known projection convention.
|
|
8
|
+
- Normals in a documented space.
|
|
9
|
+
- Camera near/far and projection matrix.
|
|
10
|
+
- Optional velocity or history for temporal filtering.
|
|
11
|
+
|
|
12
|
+
## Sampling
|
|
13
|
+
|
|
14
|
+
- Use a stable noise pattern or rotated kernel.
|
|
15
|
+
- Tie radius to world or view-space units.
|
|
16
|
+
- Reduce samples for low quality tiers.
|
|
17
|
+
- Keep thin geometry and silhouette cases visible in debug.
|
|
18
|
+
|
|
19
|
+
## Filtering
|
|
20
|
+
|
|
21
|
+
- Use bilateral filtering against depth and normal discontinuities.
|
|
22
|
+
- Upsample from half resolution carefully.
|
|
23
|
+
- Avoid bleeding occlusion across foreground/background edges.
|
|
24
|
+
|
|
25
|
+
## Applying AO
|
|
26
|
+
|
|
27
|
+
- Apply to indirect or ambient contribution, not direct sunlight.
|
|
28
|
+
- Keep strength subtle enough that materials still read.
|
|
29
|
+
- Provide a no-AO baseline for comparison.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genex-threejs-shadow-systems
|
|
3
|
+
description: Implement stable shadow systems for Genex Three.js games. Use for large worlds, directional cascades, cached clipmaps, terrain shadows, city scenes, moving cameras, targeted invalidation, quality tiers, texel stabilization, and readable contact shadows.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genex Three.js Shadow Systems
|
|
7
|
+
|
|
8
|
+
Shadows ground gameplay and explain scale. They need stability more than maximum
|
|
9
|
+
resolution everywhere.
|
|
10
|
+
|
|
11
|
+
Read [references/shadow-systems.md](references/shadow-systems.md) for cascades,
|
|
12
|
+
clipmaps, invalidation, and diagnostic captures.
|
|
13
|
+
|
|
14
|
+
## Build order
|
|
15
|
+
|
|
16
|
+
1. Define light direction, camera envelope, world scale, dynamic objects, and
|
|
17
|
+
target shadow budget.
|
|
18
|
+
2. Choose basic maps, cascades, cached clipmaps, or contact-only shadows.
|
|
19
|
+
3. Stabilize shadow texels for moving cameras.
|
|
20
|
+
4. Separate static, dynamic, and invalidated casters.
|
|
21
|
+
5. Add filtering and bias after acne/peter-panning diagnostics.
|
|
22
|
+
6. Expose debug views for cascades, texel density, casters, receivers, and bias.
|
|
23
|
+
|
|
24
|
+
## Rules
|
|
25
|
+
|
|
26
|
+
- Do not chase every artifact by raising resolution.
|
|
27
|
+
- Keep shadow distance tied to camera and gameplay scale.
|
|
28
|
+
- Cache static shadows when the world allows it.
|
|
29
|
+
- Validate sun angle extremes and fast camera motion.
|
|
30
|
+
- Provide lower-cost tiers for weaker GPUs.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Shadow Systems
|
|
2
|
+
|
|
3
|
+
Use this reference for stable shadows in Genex games.
|
|
4
|
+
|
|
5
|
+
## Cascades
|
|
6
|
+
|
|
7
|
+
- Split camera depth into near, mid, and far ranges.
|
|
8
|
+
- Allocate more resolution to gameplay-near shadows.
|
|
9
|
+
- Stabilize cascade projections to shadow texels.
|
|
10
|
+
- Show cascade boundaries in debug mode.
|
|
11
|
+
|
|
12
|
+
## Cached clipmaps
|
|
13
|
+
|
|
14
|
+
- Use clipmaps for large terrains or cities with slow-changing lighting.
|
|
15
|
+
- Update only dirty regions.
|
|
16
|
+
- Track invalidation from moving objects, time of day, or geometry edits.
|
|
17
|
+
- Keep cache memory visible in diagnostics.
|
|
18
|
+
|
|
19
|
+
## Bias and filtering
|
|
20
|
+
|
|
21
|
+
- Tune normal bias and depth bias separately.
|
|
22
|
+
- Inspect acne, peter-panning, and contact loss.
|
|
23
|
+
- Filter only after the map coverage is correct.
|
|
24
|
+
- Keep tiny decorative casters from ruining the budget.
|
|
25
|
+
|
|
26
|
+
## Quality tiers
|
|
27
|
+
|
|
28
|
+
- Low: shorter distance, fewer cascades, lower resolution.
|
|
29
|
+
- Medium: stable near shadows and simplified far coverage.
|
|
30
|
+
- High: more cascades or cached large-world coverage.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genex-threejs-skill-router
|
|
3
|
+
description: Route Genex 3D browser-game work to the smallest useful Three.js skill set. Use for new game scenes, graphics upgrades, visual reference matching, game-feel passes, render-pipeline work, publishing readiness, multiplayer-aware scene architecture, or requests spanning cameras, geometry, materials, atmosphere, water, VFX, shadows, post-processing, and validation.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genex Three.js Skill Router
|
|
7
|
+
|
|
8
|
+
Use this skill first for broad 3D browser-game requests. Load only the skills
|
|
9
|
+
that change the result; do not load the whole pack by default.
|
|
10
|
+
|
|
11
|
+
Read [references/routing-map.md](references/routing-map.md) for the full routing
|
|
12
|
+
map, execution order, and acceptance gate.
|
|
13
|
+
|
|
14
|
+
## Route by system
|
|
15
|
+
|
|
16
|
+
| Work needed | Load |
|
|
17
|
+
| --- | --- |
|
|
18
|
+
| camera rigs, authored shots, chase/orbit/side views, pointer look | `$genex-threejs-camera-direction` |
|
|
19
|
+
| game-object timelines, springs, docking, staging, debris, loops | `$genex-threejs-procedural-animation` |
|
|
20
|
+
| shared scalar/vector fields, masks, domain warping, procedural normals | `$genex-threejs-procedural-fields` |
|
|
21
|
+
| PBR identity, atlas filtering, terrain wetness, dissolves, procedural normals | `$genex-threejs-procedural-materials` |
|
|
22
|
+
| mesh writers, profile sweeps, semantic geometry, UVs, normals, material slots | `$genex-threejs-procedural-geometry` |
|
|
23
|
+
| trees, foliage, roots, branching organisms, wind | `$genex-threejs-procedural-vegetation` |
|
|
24
|
+
| buildings, modular kits, facade grammars, city assets | `$genex-threejs-procedural-architecture` |
|
|
25
|
+
| planets, spherical terrain, craters, biomes, orbit-to-surface detail | `$genex-threejs-procedural-planets` |
|
|
26
|
+
| sky, scattering, aerial perspective, atmosphere-aware lighting | `$genex-threejs-atmosphere-aerial-perspective` |
|
|
27
|
+
| volumetric clouds, weather maps, raymarch budgets, cloud shadows | `$genex-threejs-volumetric-clouds` |
|
|
28
|
+
| large FFT oceans, choppy waves, foam, spectral cascades | `$genex-threejs-spectral-ocean` |
|
|
29
|
+
| analytic water, refraction, absorption, waves, crest foam | `$genex-threejs-water-optics` |
|
|
30
|
+
| black holes, accretion disks, wormholes, curved-ray GPU effects | `$genex-threejs-raymarched-space-effects` |
|
|
31
|
+
| particles, trails, plasma, shockwaves, timed event VFX | `$genex-threejs-procedural-vfx` |
|
|
32
|
+
| accumulated frost, touch history, screen-space temporal masks | `$genex-threejs-temporal-surfaces` |
|
|
33
|
+
| cascades, clipmaps, stable large-world shadows | `$genex-threejs-shadow-systems` |
|
|
34
|
+
| GTAO, bent normals, contact grounding, AO diagnostics | `$genex-threejs-screen-space-ambient-occlusion` |
|
|
35
|
+
| HDR bloom, selective emission, glow diagnostics | `$genex-threejs-bloom` |
|
|
36
|
+
| exposure, tone mapping, color grading, LUTs | `$genex-threejs-exposure-color-grading` |
|
|
37
|
+
| render-target ownership, pass ordering, depth/normal/history signals | `$genex-threejs-image-pipeline` |
|
|
38
|
+
| fixed-view captures, seed sweeps, browser and GPU evidence | `$genex-threejs-visual-validation` |
|
|
39
|
+
|
|
40
|
+
## Routing rules
|
|
41
|
+
|
|
42
|
+
- Start from the playable game target: player verb, scene scale, camera distance,
|
|
43
|
+
input mode, and frame budget.
|
|
44
|
+
- Build silhouette, motion, and material readability before adding image effects.
|
|
45
|
+
- Prefer deterministic seeds and named controls for every procedural system.
|
|
46
|
+
- Keep game logic, simulation state, visual fields, and screen-space passes
|
|
47
|
+
separated unless coupling is intentional.
|
|
48
|
+
- Use `$genex-threejs-visual-validation` before declaring a visual task done.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Routing Map
|
|
2
|
+
|
|
3
|
+
Use this reference when a Genex game request touches multiple visual systems.
|
|
4
|
+
|
|
5
|
+
## Three.js version and references
|
|
6
|
+
|
|
7
|
+
For new Genex browser-game projects, use the current stable Three.js release and
|
|
8
|
+
pin it exactly in `package.json`. As of June 26, 2026, that is
|
|
9
|
+
`"three": "0.185.0"`.
|
|
10
|
+
|
|
11
|
+
For existing projects, inspect and respect the installed Three.js version unless
|
|
12
|
+
the user asks to upgrade. Use official Three.js docs first, then official
|
|
13
|
+
examples as implementation references. Match examples to the project's installed
|
|
14
|
+
Three.js release or branch, and do not blindly copy demo architecture.
|
|
15
|
+
|
|
16
|
+
## Execution order
|
|
17
|
+
|
|
18
|
+
1. Define the game contract: player verb, win/interaction loop, target device,
|
|
19
|
+
camera distance, scene scale, motion, and frame budget.
|
|
20
|
+
2. Select the minimum scene-generation skills: geometry, materials, vegetation,
|
|
21
|
+
architecture, planets, water, clouds, or VFX.
|
|
22
|
+
3. Add camera direction when framing, controls, transitions, or scale perception
|
|
23
|
+
affect play.
|
|
24
|
+
4. Add procedural animation when object motion needs authored phases,
|
|
25
|
+
convergence, looping, or deterministic timelines.
|
|
26
|
+
5. Add shared fields before writing multiple independent noise layers.
|
|
27
|
+
6. Add lighting, atmosphere, and shadows only after the no-post baseline reads.
|
|
28
|
+
7. Add image-pipeline, bloom, exposure, grading, or AO last.
|
|
29
|
+
8. Validate in a real browser with fixed seeds, captures, interaction checks,
|
|
30
|
+
and performance evidence.
|
|
31
|
+
|
|
32
|
+
## Acceptance gate
|
|
33
|
+
|
|
34
|
+
A routed Genex scene is incomplete until it exposes:
|
|
35
|
+
|
|
36
|
+
- deterministic or reproducible inputs;
|
|
37
|
+
- camera and input controls suited to the game verb;
|
|
38
|
+
- named perceptual parameters for the important visual systems;
|
|
39
|
+
- debug views for generated fields, masks, or passes;
|
|
40
|
+
- a no-post baseline that still communicates the subject;
|
|
41
|
+
- a clear quality tier or render-budget knob when the effect is expensive;
|
|
42
|
+
- browser evidence showing the canvas renders, moves, and responds to input.
|
|
43
|
+
|
|
44
|
+
## Publish and multiplayer awareness
|
|
45
|
+
|
|
46
|
+
Do not invent unavailable Genex service APIs. When preparing a game for Genex
|
|
47
|
+
publishing or multiplayer, inspect the project first. Prefer clean boundaries:
|
|
48
|
+
|
|
49
|
+
- renderer and scene setup isolated from transport/auth code;
|
|
50
|
+
- deterministic spawn and simulation seeds;
|
|
51
|
+
- serializable player/session state;
|
|
52
|
+
- explicit asset loading paths;
|
|
53
|
+
- one clear start function for local preview and hosted launch.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
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.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genex Three.js Spectral Ocean
|
|
7
|
+
|
|
8
|
+
Use spectral oceans when the game needs large water bodies with convincing
|
|
9
|
+
scale, directionality, and far-distance motion.
|
|
10
|
+
|
|
11
|
+
Read [references/spectral-ocean.md](references/spectral-ocean.md) for wave
|
|
12
|
+
cascades, foam, shading, and budget controls.
|
|
13
|
+
|
|
14
|
+
## Build order
|
|
15
|
+
|
|
16
|
+
1. Define wind direction, fetch, sea state, camera height range, and frame budget.
|
|
17
|
+
2. Split wavelengths into cascades for far swell, mid waves, and near detail.
|
|
18
|
+
3. Generate displacement, slope, curvature, and choppy derivatives from the
|
|
19
|
+
same wave state.
|
|
20
|
+
4. Derive whitecaps and foam from slope, compression, and lifetime.
|
|
21
|
+
5. Shade with sky reflection, Fresnel, absorption, and crest response.
|
|
22
|
+
6. Expose no-post, normal, slope, foam, and cascade debug views.
|
|
23
|
+
|
|
24
|
+
## Rules
|
|
25
|
+
|
|
26
|
+
- Keep wave state deterministic for a seed and time value.
|
|
27
|
+
- Do not fake large oceans with only scrolling normal maps.
|
|
28
|
+
- Use quality tiers for cascade count, resolution, and update cadence.
|
|
29
|
+
- Keep horizon and camera-relative origin stable.
|
|
30
|
+
- Validate motion, not only still frames.
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Spectral Ocean
|
|
2
|
+
|
|
3
|
+
Use this guide for large-scale ocean systems.
|
|
4
|
+
|
|
5
|
+
## Cascades
|
|
6
|
+
|
|
7
|
+
- Far cascade: long waves that define horizon rhythm.
|
|
8
|
+
- Mid cascade: gameplay-scale wave shape and directionality.
|
|
9
|
+
- Near cascade: filtered detail near the camera.
|
|
10
|
+
- Keep each cascade's wavelength, amplitude, direction spread, and resolution
|
|
11
|
+
named in configuration.
|
|
12
|
+
|
|
13
|
+
## Foam
|
|
14
|
+
|
|
15
|
+
- Drive whitecaps from wave compression, steepness, slope, or impact events.
|
|
16
|
+
- Store foam history when persistence matters.
|
|
17
|
+
- Fade foam by age and water motion.
|
|
18
|
+
- Keep foam masks inspectable separately from final shading.
|
|
19
|
+
|
|
20
|
+
## Shading
|
|
21
|
+
|
|
22
|
+
- Use Fresnel for view-dependent reflection.
|
|
23
|
+
- Add absorption based on path length or depth approximation.
|
|
24
|
+
- Reflect the sky or environment consistently with the scene exposure.
|
|
25
|
+
- Keep crest scatter and emission-like highlights bounded.
|
|
26
|
+
|
|
27
|
+
## Performance
|
|
28
|
+
|
|
29
|
+
- Expose low, medium, and high ocean tiers.
|
|
30
|
+
- Reduce update rate or resolution for background water.
|
|
31
|
+
- Keep render-target inventory visible in debug output.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genex-threejs-temporal-surfaces
|
|
3
|
+
description: Build temporal screen-space and surface-history effects for Genex Three.js games. Use for touch history, frost clearing, burn-in masks, wet trails, accumulation buffers, ping-pong render targets, reduced-resolution blur, refraction masks, and interaction effects that persist over time.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genex Three.js Temporal Surfaces
|
|
7
|
+
|
|
8
|
+
Use temporal surfaces when player interaction should leave a visible history.
|
|
9
|
+
Keep the accumulated state inspectable and resettable.
|
|
10
|
+
|
|
11
|
+
Read [references/temporal-surfaces.md](references/temporal-surfaces.md) for
|
|
12
|
+
ping-pong buffers, history masks, blur, and reset rules.
|
|
13
|
+
|
|
14
|
+
## Build order
|
|
15
|
+
|
|
16
|
+
1. Define the surface history: input source, accumulation value, decay, clear
|
|
17
|
+
behavior, and gameplay meaning.
|
|
18
|
+
2. Allocate explicit history targets.
|
|
19
|
+
3. Write events into the history buffer with stable coordinates.
|
|
20
|
+
4. Apply blur, diffusion, or erosion as separate passes.
|
|
21
|
+
5. Composite the result into material, refraction, opacity, or color.
|
|
22
|
+
6. Expose debug views for input, history, blur, decay, and final composite.
|
|
23
|
+
|
|
24
|
+
## Rules
|
|
25
|
+
|
|
26
|
+
- Provide a reset path for scene restart and level changes.
|
|
27
|
+
- Keep history resolution and update cadence configurable.
|
|
28
|
+
- Do not let temporal blur hide bad input mapping.
|
|
29
|
+
- Clamp accumulated values and decay deterministically.
|
|
30
|
+
- Validate pause/resume, resize, and device pixel ratio changes.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# Temporal Surfaces
|
|
2
|
+
|
|
3
|
+
Use this reference for persistent interaction effects.
|
|
4
|
+
|
|
5
|
+
## History buffer
|
|
6
|
+
|
|
7
|
+
- Store history in one or more render targets.
|
|
8
|
+
- Ping-pong read and write targets each update.
|
|
9
|
+
- Keep UV or screen-space mapping explicit.
|
|
10
|
+
- Reset on scene reload, resize, or level restart.
|
|
11
|
+
|
|
12
|
+
## Event writing
|
|
13
|
+
|
|
14
|
+
- Convert pointer, collision, projectile, or gameplay events into stable
|
|
15
|
+
coordinates.
|
|
16
|
+
- Write shape, strength, radius, and timestamp or age.
|
|
17
|
+
- Avoid direct dependence on frame rate.
|
|
18
|
+
|
|
19
|
+
## Decay and blur
|
|
20
|
+
|
|
21
|
+
- Apply decay before or after new input intentionally.
|
|
22
|
+
- Use separable blur for large soft effects.
|
|
23
|
+
- Keep low-resolution buffers from causing visible blockiness.
|
|
24
|
+
- Expose unblurred and blurred views.
|
|
25
|
+
|
|
26
|
+
## Compositing
|
|
27
|
+
|
|
28
|
+
Temporal history can drive opacity, frost, wetness, scorch, refraction, glow, or
|
|
29
|
+
normal distortion. Keep the visual role clear and provide a no-history fallback.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genex-threejs-visual-validation
|
|
3
|
+
description: Validate Genex Three.js game visuals in a real browser. Use for fixed-view captures, no-post baselines, diagnostic mosaics, seed sweeps, camera-distance checks, temporal stability, interaction smoke checks, render-target inventories, GPU budgets, and evidence before claiming a 3D scene is done.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genex Three.js Visual Validation
|
|
7
|
+
|
|
8
|
+
Validate the mechanism that creates the image, not just one attractive frame.
|
|
9
|
+
For Genex games, also validate that the canvas runs and responds to input.
|
|
10
|
+
|
|
11
|
+
Read [references/visual-validation.md](references/visual-validation.md) for the
|
|
12
|
+
evidence checklist and rejection conditions.
|
|
13
|
+
|
|
14
|
+
## Validation sequence
|
|
15
|
+
|
|
16
|
+
1. Freeze seed, camera, time, quality tier, and viewport.
|
|
17
|
+
2. Capture final image and no-post baseline.
|
|
18
|
+
3. Capture system-specific diagnostic views.
|
|
19
|
+
4. Check near, design, and far camera distances.
|
|
20
|
+
5. Sweep at least one alternate seed or parameter extreme.
|
|
21
|
+
6. Check motion, pause/resume, resize, and input response.
|
|
22
|
+
7. Record frame timing and render-target inventory when available.
|
|
23
|
+
8. Keep written invariants and known compromises.
|
|
24
|
+
|
|
25
|
+
## Failure conditions
|
|
26
|
+
|
|
27
|
+
- Approval relies on one screenshot.
|
|
28
|
+
- The scene only reads with bloom, haze, or grading enabled.
|
|
29
|
+
- Random seeds are not reproducible.
|
|
30
|
+
- Debug views are unavailable for generated fields or passes.
|
|
31
|
+
- Browser canvas is blank, off-frame, unresponsive, or broken after resize.
|
|
32
|
+
- Temporal artifacts are judged only from still images.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Visual Validation
|
|
2
|
+
|
|
3
|
+
Use this checklist before considering a Genex 3D browser-game visual complete.
|
|
4
|
+
|
|
5
|
+
## Evidence set
|
|
6
|
+
|
|
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.
|
|
14
|
+
|
|
15
|
+
## Browser checks
|
|
16
|
+
|
|
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`.
|
|
23
|
+
|
|
24
|
+
## Diagnostic views
|
|
25
|
+
|
|
26
|
+
Prefer simple toggles over hidden assumptions:
|
|
27
|
+
|
|
28
|
+
- wireframe or bounds;
|
|
29
|
+
- normals;
|
|
30
|
+
- depth;
|
|
31
|
+
- masks;
|
|
32
|
+
- raw fields;
|
|
33
|
+
- no-light and no-post modes;
|
|
34
|
+
- individual post effects.
|
|
35
|
+
|
|
36
|
+
## Rejection conditions
|
|
37
|
+
|
|
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.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: genex-threejs-volumetric-clouds
|
|
3
|
+
description: Build volumetric cloud systems for Genex Three.js games. Use for weather-shaped density, bounded raymarching, cloud layers, erosion detail, lighting cones, silver lining, temporal reconstruction, cloud shadows, quality tiers, and sky drama with controlled budgets.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Genex Three.js Volumetric Clouds
|
|
7
|
+
|
|
8
|
+
Clouds are expensive and scene-defining. Use them when they support scale,
|
|
9
|
+
weather, mood, navigation, or gameplay.
|
|
10
|
+
|
|
11
|
+
Read [references/volumetric-clouds.md](references/volumetric-clouds.md) for
|
|
12
|
+
density, lighting, reconstruction, and budget controls.
|
|
13
|
+
|
|
14
|
+
## Build order
|
|
15
|
+
|
|
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.
|
|
22
|
+
|
|
23
|
+
## Rules
|
|
24
|
+
|
|
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.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Volumetric Clouds
|
|
2
|
+
|
|
3
|
+
Use this reference for cloud rendering in Genex games.
|
|
4
|
+
|
|
5
|
+
## Density model
|
|
6
|
+
|
|
7
|
+
- Weather map controls coverage, cloud type, and density scale.
|
|
8
|
+
- Height profile controls base, body, and top falloff.
|
|
9
|
+
- Detail erosion breaks up silhouettes.
|
|
10
|
+
- Wind moves the sample domain consistently over time.
|
|
11
|
+
|
|
12
|
+
## Raymarching
|
|
13
|
+
|
|
14
|
+
- Intersect the camera ray with a bounded cloud volume.
|
|
15
|
+
- Use coarse steps before expensive lighting.
|
|
16
|
+
- Early-exit when transmittance is low.
|
|
17
|
+
- Keep step count and resolution adjustable.
|
|
18
|
+
|
|
19
|
+
## Lighting
|
|
20
|
+
|
|
21
|
+
- Use sun direction from the scene.
|
|
22
|
+
- Add forward-scattering emphasis for bright cloud edges.
|
|
23
|
+
- Approximate self-shadow with short secondary samples or cached maps.
|
|
24
|
+
- Keep cloud shadows optional and low-frequency.
|
|
25
|
+
|
|
26
|
+
## Temporal behavior
|
|
27
|
+
|
|
28
|
+
- Reprojection can reduce cost but must expose history diagnostics.
|
|
29
|
+
- Validate camera cuts, fast turns, and pause/resume behavior.
|
|
30
|
+
- Provide a single-frame mode for debugging.
|