@genex-ai/cli-demo 0.68.0 → 0.70.0-dev.182
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 +366 -15
- package/package.json +2 -1
- package/templates/controllers/character/vrm/vrm-loader.ts +74 -11
- package/templates/controllers/quality/governor.ts +147 -0
- package/templates/controllers/quality/pick-asset.ts +57 -0
- package/templates/controllers/quality/tier.ts +170 -0
- package/templates/skills/genex-ai-menu/SKILL.md +7 -1
- package/templates/skills/genex-ai-skybox/SKILL.md +15 -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-explore/SKILL.md +1 -1
- package/templates/skills/genex-getting-started/SKILL.md +2 -2
- package/templates/skills/genex-threejs-adaptive-quality/SKILL.md +141 -0
- package/templates/skills/genex-threejs-adaptive-quality/references/adaptive-quality.md +105 -0
- package/templates/skills/genex-threejs-bloom/SKILL.md +4 -1
- package/templates/skills/genex-threejs-bloom/references/bloom.md +1 -1
- package/templates/skills/genex-threejs-camera-direction/SKILL.md +48 -8
- package/templates/skills/genex-threejs-camera-direction/references/camera-rigs.md +62 -0
- package/templates/skills/genex-threejs-embed-auth/SKILL.md +4 -1
- package/templates/skills/genex-threejs-game-feel/SKILL.md +4 -1
- package/templates/skills/genex-threejs-game-ui/SKILL.md +42 -8
- package/templates/skills/genex-threejs-image-pipeline/SKILL.md +5 -0
- package/templates/skills/genex-threejs-image-pipeline/references/image-pipeline.md +1 -1
- package/templates/skills/genex-threejs-lighting-design/SKILL.md +5 -1
- package/templates/skills/genex-threejs-multiplayer/SKILL.md +7 -1
- package/templates/skills/genex-threejs-multiplayer/references/host-physics.md +6 -3
- package/templates/skills/genex-threejs-physics-rapier/references/colliders-from-assets.md +1 -0
- package/templates/skills/genex-threejs-screen-space-ambient-occlusion/references/ambient-occlusion.md +1 -1
- package/templates/skills/genex-threejs-shadow-systems/SKILL.md +6 -0
- package/templates/skills/genex-threejs-shadow-systems/references/shadow-systems.md +1 -1
- package/templates/skills/genex-threejs-skill-router/SKILL.md +26 -5
- package/templates/skills/genex-threejs-skill-router/references/routing-map.md +21 -7
- package/templates/skills/genex-threejs-spectral-ocean/references/spectral-ocean.md +1 -1
- package/templates/skills/genex-threejs-touch-controls/SKILL.md +11 -0
- package/templates/skills/genex-threejs-visual-validation/SKILL.md +29 -12
- package/templates/skills/genex-threejs-water-optics/references/water-optics.md +1 -1
- package/templates/skills/genex-updates/SKILL.md +1 -1
|
@@ -180,7 +180,10 @@ Three.js release or branch, and do not blindly copy demo architecture.
|
|
|
180
180
|
(`$genex-threejs-visual-validation` owns the capture discipline).
|
|
181
181
|
7. Add camera direction when framing, controls, transitions, or scale perception
|
|
182
182
|
affect play — or the game aims with the mouse (shooter/FPS/turret): the
|
|
183
|
-
step-4 bucket decision executes here.
|
|
183
|
+
step-4 bucket decision executes here. And before ANY hand-rolled
|
|
184
|
+
steering/pan/look math: the screen-direction contract (D → screen-right,
|
|
185
|
+
mouse-right → view right, drag axes one convention) with verified copy-paste
|
|
186
|
+
bases lives there — signs are copied, never derived.
|
|
184
187
|
8. Add procedural animation when object motion needs authored phases,
|
|
185
188
|
convergence, looping, or deterministic timelines.
|
|
186
189
|
9. Add shared fields before writing multiple independent noise layers.
|
|
@@ -191,7 +194,11 @@ Three.js release or branch, and do not blindly copy demo architecture.
|
|
|
191
194
|
step-4 post plan, not inventing one now. This is a completion gate: the
|
|
192
195
|
named post stack must be BUILT before the game is called done, published,
|
|
193
196
|
or handed off — a game rendering on stock three.js defaults is not done,
|
|
194
|
-
and the gate does not wait for the word "done" to be said.
|
|
197
|
+
and the gate does not wait for the word "done" to be said. The stack is
|
|
198
|
+
tier-gated (`$genex-threejs-adaptive-quality`): full on desktop, the built
|
|
199
|
+
tone-mapping pass + the tier's light additions on phones — wire the
|
|
200
|
+
governor's post toggle so phone tiers drop the heavy passes, never ship
|
|
201
|
+
them undropped.
|
|
195
202
|
12. Once the loop is playable, build the planned interface states via
|
|
196
203
|
`$genex-threejs-game-ui` (HUD, pause on Escape, fail/retry, win, and the
|
|
197
204
|
full loading state grown from the step-6 loader), then `npx genex wait`
|
|
@@ -250,7 +257,7 @@ module — a corrupted entry point costs more than the minutes saved.
|
|
|
250
257
|
|
|
251
258
|
**Game fast path:** for a game task that loaded no procedural/visual-system skill,
|
|
252
259
|
done = a screenshot plus an interaction smoke check (load the page, press each
|
|
253
|
-
control, assert a visible response — `$genex-threejs-visual-validation` has the
|
|
260
|
+
control, assert a visible response in its labeled direction — `$genex-threejs-visual-validation` has the
|
|
254
261
|
procedure), **plus the UI floor from `$genex-threejs-game-ui` (the generated
|
|
255
262
|
sprite HUD wired in — not the CSS placeholder — pause on Escape, the branded
|
|
256
263
|
loader with its key-art background, the brief's font pair actually loaded)
|
|
@@ -277,7 +284,11 @@ A routed Genex scene is incomplete until it exposes:
|
|
|
277
284
|
- named perceptual parameters for the important visual systems;
|
|
278
285
|
- debug views for generated fields, masks, or passes;
|
|
279
286
|
- a no-post baseline that still communicates the subject;
|
|
280
|
-
- a clear quality tier or render-budget knob when the effect is expensive
|
|
287
|
+
- a clear quality tier or render-budget knob when the effect is expensive —
|
|
288
|
+
and for every GAME, the adaptive-quality tier wired at boot
|
|
289
|
+
(`$genex-threejs-adaptive-quality`): tier-capped pixel ratio, tier shadow
|
|
290
|
+
budget, the runtime governor in the loop, and generated skybox/texture
|
|
291
|
+
loads routed through their rungs;
|
|
281
292
|
- when physics or controllers are in play, a fixed-timestep loop: per-frame
|
|
282
293
|
work (platforms, enter/exit, controller updates) runs inside the physics
|
|
283
294
|
world's before-step hook, then the world steps — never in the render loop;
|
|
@@ -287,9 +298,12 @@ A routed Genex scene is incomplete until it exposes:
|
|
|
287
298
|
|
|
288
299
|
**Publishing IS calling it done.** Before `npx genex publish`, every completion
|
|
289
300
|
gate above must pass — sprite HUD wired, Escape pause working, branded loader
|
|
290
|
-
with its key art, fonts loaded, renderer baseline + one built post effect
|
|
291
|
-
|
|
292
|
-
|
|
301
|
+
with its key art, fonts loaded, renderer baseline + one built post effect
|
|
302
|
+
(tier-aware), the adaptive-quality tier wired at boot, world dressing placed
|
|
303
|
+
or validly waived, and the content contract's countables present or
|
|
304
|
+
explicitly re-scoped by the user. `genex preview`/`publish` print a mobile
|
|
305
|
+
preflight (estimated phone GPU memory vs budget) — treat a warning there as a
|
|
306
|
+
gate item too. If any is still
|
|
293
307
|
pending, say which and publish only after an explicit go-ahead.
|
|
294
308
|
|
|
295
309
|
Do not invent unavailable Genex service APIs. When preparing a game for Genex
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Use this reference for a large, unbounded-looking ocean whose identity comes from directional spectral synthesis, staged inverse FFTs, derivative maps, Jacobian whitecaps, and coherent optical shading.
|
|
4
4
|
|
|
5
|
-
> **Renderer note:** this reference assumes `WebGPURenderer` + TSL node materials. Check the project's actual renderer first — the Genex scaffold ships vanilla WebGL three.js. On WebGL, adapt the technique with standard materials / `EffectComposer` passes or pick a simpler alternative; never switch renderers mid-project.
|
|
5
|
+
> **Renderer note:** this reference assumes `WebGPURenderer` + TSL node materials. Check the project's actual renderer first — the Genex scaffold ships vanilla WebGL three.js. On WebGL, adapt the technique with standard materials / `EffectComposer` passes or pick a simpler alternative; never switch renderers mid-project. Either way the effect obeys the device tier (`$genex-threejs-adaptive-quality`): expensive passes are desktop-tier, and on WebGPU the per-target MSAA sample count is a runtime knob the governor may drive.
|
|
6
6
|
|
|
7
7
|
## Contents
|
|
8
8
|
|
|
@@ -75,6 +75,10 @@ Pick what matches the game; most games need exactly one or two of these.
|
|
|
75
75
|
lives on the stick; the static circle is fine for slower games. On the
|
|
76
76
|
bundled character controller, pass it through instead — see
|
|
77
77
|
`$genex-threejs-character-controller` (`joystick: { x: joy.x, y: joy.y }`).
|
|
78
|
+
Touch axes obey the same screen-direction contract as WASD and the mouse
|
|
79
|
+
(`$genex-threejs-camera-direction`): stick-right must move the player
|
|
80
|
+
screen-right, drag-right must turn the view right — a flipped feel is a sign
|
|
81
|
+
bug in the mapping, never a device quirk.
|
|
78
82
|
- **Camera look → drag zone on the right half.** Default `DragZone()` is
|
|
79
83
|
exactly that; per frame `const { dx, dy } = look.consumeDelta()` then apply
|
|
80
84
|
to yaw/pitch with the same sensitivity scale as the mouse path. Games on the
|
|
@@ -149,6 +153,13 @@ z-order stays: drag zone (5) under joystick/buttons (10) under pause menus.
|
|
|
149
153
|
canvas. If the game also needs taps there (tap to shoot), read them from the
|
|
150
154
|
zone (`onChange` + a small-movement threshold) or shrink the zone.
|
|
151
155
|
|
|
156
|
+
## Input is half of phone-playable
|
|
157
|
+
|
|
158
|
+
This skill is INPUT only. A phone that can steer a game that then runs out of
|
|
159
|
+
GPU memory still loses the player — the rendering half (device tiers, DPR and
|
|
160
|
+
shadow budgets, the runtime governor, per-tier asset rungs) lives in
|
|
161
|
+
`$genex-threejs-adaptive-quality` and is wired at boot for every game.
|
|
162
|
+
|
|
152
163
|
## When you skip
|
|
153
164
|
|
|
154
165
|
Say it in one plain line — *"skipped touch controls: the game is
|
|
@@ -72,9 +72,17 @@ everything twice.
|
|
|
72
72
|
skill's "Self-testing a draft" section) — so you see the game, not the
|
|
73
73
|
sign-in gate.
|
|
74
74
|
2. Press each documented control once (keys, pointer); assert a **visible
|
|
75
|
-
response
|
|
76
|
-
|
|
77
|
-
|
|
75
|
+
response in its labeled direction** — this is the input-direction pass, and
|
|
76
|
+
it is part of THIS check, not an extra testing loop. Hold `KeyD`/ArrowRight
|
|
77
|
+
~0.5s and screenshot-diff: the controlled thing moves or turns toward
|
|
78
|
+
screen-RIGHT (for a pan camera the viewport slides right — the terrain
|
|
79
|
+
streams LEFT); `KeyA`/ArrowLeft mirrors it. Keyboard synthesis needs no
|
|
80
|
+
pointer lock, so this works headless. For drag rigs, drag right AND drag up:
|
|
81
|
+
both axes must follow the one stated convention (grab-the-world or
|
|
82
|
+
move-the-camera — never one each). A response in the WRONG direction is a
|
|
83
|
+
fail, not a note: two shipped games passed "controls respond" while D
|
|
84
|
+
steered screen-left. For an animated character, capture idle, walk, run,
|
|
85
|
+
crouch-idle, crouch-move, and jump. Inspect shoulders, elbows, wrists, and hands as well
|
|
78
86
|
as the feet: a fully bound non-T-pose can still be stylistically broken.
|
|
79
87
|
Reject shrugging palms-up poses, permanently raised elbows, or a gait whose
|
|
80
88
|
upper-body style contradicts the requested character. “No T-pose” is not
|
|
@@ -104,16 +112,19 @@ everything twice.
|
|
|
104
112
|
floating above detached wheels means the model was box-fit against the
|
|
105
113
|
preset's wheelbase (the vehicle skill's "Custom generated bodies" rules
|
|
106
114
|
fix it).
|
|
107
|
-
6.
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
115
|
+
6. The cursor pass — every game, per the lock-or-tool rule: during play the OS
|
|
116
|
+
cursor is either the gameplay tool (cursor-core — confirm the explicit
|
|
117
|
+
`pointerLockAim: false` opt-out, cursor stays) or it is LOCKED away; a
|
|
118
|
+
non-cursor-core game with the arrow parked over the action is a defect, even
|
|
119
|
+
a keyboard-only racer. Aim games additionally: click the canvas and assert
|
|
120
|
+
the pointer locks (cursor gone, mouse-RIGHT turns the view RIGHT and
|
|
121
|
+
mouse-UP looks UP — name BOTH axes; yaw-only evidence has let inverted pitch
|
|
122
|
+
ship); press Esc and assert the "click to aim/resume" cue appears. The cue
|
|
123
|
+
should be the bundled `createAimCue` helper (or an equivalent
|
|
112
124
|
`onAimChange`-driven overlay) — a MANDATORY-bucket game with no unlocked cue
|
|
113
|
-
fails.
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
say plainly that the lock itself needs one manual click.
|
|
125
|
+
fails. Headless caveat: `requestPointerLock` throws in headless Chromium —
|
|
126
|
+
assert the wiring and the unlocked cue in a screenshot, and say plainly that
|
|
127
|
+
the lock itself needs one manual click (do the both-axes look check there).
|
|
117
128
|
7. **Ask the scene the three things the screenshot cannot answer** (below). Run it
|
|
118
129
|
once, in the same browser you already have open.
|
|
119
130
|
|
|
@@ -279,6 +290,12 @@ visual-system work — the sequence above.
|
|
|
279
290
|
|
|
280
291
|
- a MANDATORY-bucket aim game never requests pointer lock, or locks with no
|
|
281
292
|
visible unlocked cue;
|
|
293
|
+
- a movement key or look axis whose on-screen direction contradicts its label
|
|
294
|
+
(D turning the vehicle screen-left, mouse-up looking down with no invert
|
|
295
|
+
option);
|
|
296
|
+
- drag-pan axes that mix conventions (one axis grab-the-world, the other
|
|
297
|
+
move-the-camera);
|
|
298
|
+
- a non-cursor-core game that leaves the OS cursor visible during play;
|
|
282
299
|
- approval relies on a single frame;
|
|
283
300
|
- post-processing cannot be disabled per pass;
|
|
284
301
|
- random seeds are not reproducible;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Use this reference for bounded or analytic water with shared displacement and normals, derivative-filtered detail, analytic reflection, heuristic refraction, absorption, and crest foam. Use `$genex-threejs-spectral-ocean` for stochastic FFT seas.
|
|
4
4
|
|
|
5
|
-
> **Renderer note:** this reference assumes `WebGPURenderer` + TSL node materials. Check the project's actual renderer first — the Genex scaffold ships vanilla WebGL three.js. On WebGL, adapt the technique with standard materials / `EffectComposer` passes or pick a simpler alternative; never switch renderers mid-project.
|
|
5
|
+
> **Renderer note:** this reference assumes `WebGPURenderer` + TSL node materials. Check the project's actual renderer first — the Genex scaffold ships vanilla WebGL three.js. On WebGL, adapt the technique with standard materials / `EffectComposer` passes or pick a simpler alternative; never switch renderers mid-project. Either way the effect obeys the device tier (`$genex-threejs-adaptive-quality`): expensive passes are desktop-tier, and on WebGPU the per-target MSAA sample count is a runtime knob the governor may drive.
|
|
6
6
|
|
|
7
7
|
## Contents
|
|
8
8
|
|
|
@@ -38,7 +38,7 @@ update, so update immediately.)
|
|
|
38
38
|
Run exactly the command the nudge printed, from the game project root:
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
npm i -D @genex-ai/cli-demo@
|
|
41
|
+
npm i -D @genex-ai/cli-demo@dev # the genex CLI (a dev dependency)
|
|
42
42
|
npm i @genex-ai/embed-sdk@latest # identity/saves SDK (ships inside the game)
|
|
43
43
|
npm i @genex-ai/multiplayer@latest # multiplayer SDK (only if the game uses it)
|
|
44
44
|
```
|