@genex-ai/cli-demo 1.32.1-dev.671 → 1.32.2-dev.673

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genex-ai/cli-demo",
3
- "version": "1.32.1-dev.671",
3
+ "version": "1.32.2-dev.673",
4
4
  "description": "Set up your project's agent workspace (.claude/.codex/.cursor in the game folder), authorize, create a game project, generate AI assets, and publish (genex CLI).",
5
5
  "type": "module",
6
6
  "bin": {
@@ -68,6 +68,16 @@ const renderer = new THREE.WebGLRenderer({
68
68
  ...depthRendererOptions(), // reversed-Z: distant surfaces stop z-fighting, early-Z kept
69
69
  });
70
70
  renderer.setPixelRatio(Math.min(window.devicePixelRatio, tier.dprCap));
71
+ // Shadows: PCF, never PCFSoft. three r186 REMOVED PCFSoftShadowMap; it warns
72
+ // once and downgrades on the first shadow pass — and with the static-scene
73
+ // rule (shadowMap.autoUpdate = false) that pass comes after your materials
74
+ // compiled, so the driver rejects every shadow-receiving draw call and the
75
+ // world is an empty fog behind a working HUD (measured 2026-09-11 on a
76
+ // published village). Mechanism + console check: $genex-threejs-shadow-systems.
77
+ renderer.shadowMap.enabled = tier.shadowMapSize > 0;
78
+ renderer.shadowMap.type = THREE.PCFShadowMap;
79
+ renderer.shadowMap.autoUpdate = false; // static scene: re-render shadows on demand (needsUpdate = true when casters move)
80
+ renderer.shadowMap.needsUpdate = true; // primed: the maps exist before any receiver draws (2 rejected boot frames otherwise)
71
81
  // Camera range comes from the WORLD, never from a docs example (0.1/1000):
72
82
  const { near, far } = cameraNearFar({ closest: 1.5, farthest: 800 });
73
83
  const camera = new THREE.PerspectiveCamera(60, innerWidth / innerHeight, near, far);
@@ -249,7 +259,10 @@ not the player's account. Default Auto.
249
259
  ## Budgets that ride the tier (not separate rules)
250
260
 
251
261
  - Shadows: `tier.shadowMapSize`, `shadow.autoUpdate = false` for static scenes,
252
- at most 2 cascades on phones (`$genex-threejs-shadow-systems`).
262
+ at most 2 cascades on phones, and `shadowMap.type = THREE.PCFShadowMap` —
263
+ PCFSoft was removed in three r186 and, together with `autoUpdate = false`,
264
+ blanks every shadow receiver (`$genex-threejs-shadow-systems` has the
265
+ mechanism and the console check).
253
266
  - Post: phone floor is a BUILT tone-mapping/output pass (`postLevel: 'light'`
254
267
  adds FXAA/vignette); SSAO, volumetrics, and DoF are desktop-tier only
255
268
  (`$genex-game-director`'s routing map owns the floor wording).
@@ -33,7 +33,7 @@ cost of guessing high is a dead page.
33
33
  `desktop-low` is the weak-desktop demotion (Intel iGPU MacBooks, old integrated
34
34
  AMD): desktop GPU renderer strings are UNMASKED (unlike iOS), so one boot probe
35
35
  separates a 2015 Intel Air from an M3 Max. The full desktop path on those
36
- machines — DPR 2 + 4× MSAA + 2048 PCFSoft shadows + full bloom — is the classic
36
+ machines — DPR 2 + 4× MSAA + 2048 PCF shadows + full bloom — is the classic
37
37
  "huge lags on a MacBook" recipe, and two of its costs (context MSAA, shadow
38
38
  budget) were previously invisible to the governor.
39
39
 
@@ -18,6 +18,37 @@ shadow maps ≤1024² on phones (512² on the low tier — a 4096² map alone is
18
18
  4, and `shadowMap.autoUpdate = false` for static scenes (re-render on demand:
19
19
  a shadow pass is a full extra scene render every frame otherwise).
20
20
 
21
+ ## Shadow map type — PCF, and verify it
22
+
23
+ `renderer.shadowMap.type = THREE.PCFShadowMap`, in every scene, bounded or not.
24
+ `PCFSoftShadowMap` was REMOVED in three r186: the renderer logs
25
+ `WebGLShadowMap: PCFSoftShadowMap has been removed` once and downgrades on the
26
+ first shadow pass. Under `shadowMap.autoUpdate = true` that is one warning and a
27
+ crisper shadow. Under the static-scene rule above (`autoUpdate = false`,
28
+ `needsUpdate` on demand) the first pass lands AFTER your materials compiled:
29
+ they keep a `sampler2D` program, the depth textures that pass allocates are
30
+ comparison textures, three's recompile-on-type-change never fires (its
31
+ "previous type" was captured before you assigned the removed value), and the
32
+ driver rejects every shadow-receiving draw call — `GL_INVALID_OPERATION:
33
+ glDrawElements: Mismatch between texture format and sampler type
34
+ (signed/unsigned/float/shadow)`, one line per mesh per frame. The world is an
35
+ empty fog; the DOM HUD still draws. Measured 2026-09-11 on a published village:
36
+ one "removed" line, 200+ rejections, no ground, no buildings, while the same
37
+ warning in a second game that had left `autoUpdate` on cost nothing.
38
+
39
+ Prime the frozen map too: `shadowMap.needsUpdate = true` before the first
40
+ frame, so the maps exist before any receiver draws — measured on a three
41
+ 0.186.0 repro, `PCFShadowMap` + `autoUpdate = false` alone still lost its
42
+ first two frames to the same rejection (0 with the prime; 10 of 12 with
43
+ PCFSoft).
44
+
45
+ Verify it inside the smoke check (`$genex-threejs-visual-validation`): after
46
+ the first few frames the console must contain neither `PCFSoftShadowMap` nor
47
+ `GL_INVALID_OPERATION: glDraw`. Both arrive as WARNINGS, so "no console
48
+ errors" does not cover them — read the warnings. A software-rasteriser tier
49
+ that runs with shadows off cannot show this bug; a green check there says
50
+ nothing about the desktop tier players get.
51
+
21
52
  ## Cached clipmap workflow
22
53
 
23
54
  1. Define concentric light-space square levels.
@@ -70,7 +70,9 @@ The player deciding "does it feel right?" is faster and truer than you clicking
70
70
  everything twice.
71
71
 
72
72
  1. Load the page in a real browser; the canvas renders (no black screen, no
73
- console errors). For an unpublished draft, open the dev server in local
73
+ console errors and no console WARNING naming a removed three.js API or
74
+ `GL_INVALID_OPERATION`: those arrive at warn level and each one is a mesh
75
+ the driver refused to draw, `$genex-threejs-shadow-systems` has the case). For an unpublished draft, open the dev server in local
74
76
  test mode — `http://localhost:5173/?genex_local_test=1` (the embed-auth
75
77
  skill's "Self-testing a draft" section) — so you see the game, not the
76
78
  sign-in gate. Then hit-test the screen that is up (title now, pause later):