@genex-ai/cli-demo 0.77.0-dev.197 → 0.77.1-dev.199

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 CHANGED
@@ -1640,7 +1640,7 @@ function scanGlb(bytes) {
1640
1640
  }
1641
1641
 
1642
1642
  // ../../packages/mobile-scan/src/scan.ts
1643
- var GENEX_GENERATION_URL_RE = /https:\/\/assets\.genex\.technology\/generations\/([A-Za-z0-9._-]+)\/([A-Za-z0-9._@-]+)/g;
1643
+ var GENEX_GENERATION_URL_RE = /https:\/\/[A-Za-z0-9.-]+\/generations\/([A-Za-z0-9._-]+)\/([A-Za-z0-9._@-]+)/g;
1644
1644
  var SKYBOX_ROLE = "skybox-equirect";
1645
1645
  var MOBILE_RUNG_SUFFIX_RE = /@(\d+)$/;
1646
1646
  var MOBILE_BUDGET_MB = { broad: 300, modern: 700 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@genex-ai/cli-demo",
3
- "version": "0.77.0-dev.197",
3
+ "version": "0.77.1-dev.199",
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": {
@@ -10,7 +10,12 @@
10
10
  // a rung failure, so the worst case is today's behavior — never a broken boot.
11
11
  import type { QualityTier } from './tier.ts';
12
12
 
13
- const GENEX_GENERATIONS_RE = /^https:\/\/assets\.genex\.technology\/generations\/[^/]+\/[^/@]+$/;
13
+ // Host-agnostic on purpose: each stand serves generated assets from its own
14
+ // domain (prod assets.genex.technology, dev assets.auras.cc), and baking one
15
+ // host in would silently disable the whole ladder everywhere else — the
16
+ // fallback contract makes a false positive harmless (404 rung -> warn ->
17
+ // original), so the path shape is the only thing worth matching.
18
+ const GENEX_GENERATIONS_RE = /^https:\/\/[^/]+\/generations\/[^/]+\/[^/@]+$/;
14
19
 
15
20
  /** Rung widths by role family — mirrors the server's ladder (store.ts MOBILE_RUNGS). */
16
21
  function rungWidthFor(url: string, tier: QualityTier): number | null {
@@ -68,10 +68,20 @@ const governor = new QualityGovernor(tier, {
68
68
  sun.shadow.map?.dispose(); sun.shadow.map = null; // realloc at the new size
69
69
  },
70
70
  setDrawDistanceScale: (m) => (scene.fog!.far = baseFogFar * tier.drawDistanceScale * m),
71
+ setFrameCap: (fps) => (frameCap = fps), // 0/undefined-safe: tier.frameCap restores it
71
72
  }, renderer);
72
73
 
73
- // In the render loop, with the same performance.now() delta the loop already computes:
74
- governor.frame(deltaMs);
74
+ // In the render loop, with the same performance.now() delta the loop already
75
+ // computes. Wire ALL the callbacks — every omitted one is a governor rung
76
+ // that silently no-ops. The frame cap paces inside setAnimationLoop:
77
+ let frameCap = tier.frameCap, lastFrame = 0;
78
+ renderer.setAnimationLoop((t) => {
79
+ if (frameCap < 60 && t - lastFrame < 1000 / frameCap - 1) return; // skip: stable 30 > stuttery 45
80
+ const deltaMs = lastFrame ? t - lastFrame : 16;
81
+ lastFrame = t;
82
+ governor.frame(deltaMs);
83
+ // ...update + render
84
+ });
75
85
  ```
76
86
 
77
87
  Sustained slow frames step down (DPR ×0.8 → post off → shadows reduced →
@@ -56,10 +56,19 @@ Getting this wrong produces silent no-ops or a session stuck ugly:
56
56
  - **Load-time (fixed for the session once fetched):** asset rungs (skybox and
57
57
  texture resolutions), model LOD sets. `pickAsset` decides them from the tier
58
58
  at load; switching later means a re-fetch — treat as fixed.
59
+ - **Scene-build-fixed: the light COUNT.** Three.js bakes the number of lights
60
+ of each type into every lit material's shader program; add, remove, or hide
61
+ a light (or a group containing one) mid-play and ALL lit materials recompile
62
+ synchronously on that frame — a multi-second freeze that boot-time
63
+ `compileAsync` cannot pre-warm because each new count is a new shader. A
64
+ pilot game froze ~3 s on every pickup exactly this way (each collected
65
+ relic's group hid a child PointLight). Drive `intensity` to 0 instead;
66
+ change the population only on full level swaps.
59
67
  - **Runtime-free (the governor's domain):** `setPixelRatio`, post passes on/off
60
68
  and their target resolutions, shadow map size (realloc), draw distance and
61
69
  fog, LOD bias, particle counts, mixer update rates, frame cap, remote-avatar
62
- animation count.
70
+ animation count. Light `intensity` is runtime-free; light COUNT is not (see
71
+ above).
63
72
 
64
73
  ## Governor mechanics
65
74
 
@@ -101,6 +101,14 @@ kill-switch diagnostic.
101
101
  ## Rules
102
102
 
103
103
  - Every light names its cause; a light nothing explains is a bug, not mood.
104
+ - **The light population is fixed at scene build — never add, remove, or hide
105
+ a light (or a group containing one) during play.** Three.js counts lights
106
+ into every lit material's shader; a changed count recompiles ALL of them
107
+ synchronously — a multi-second freeze on the exact frame a pickup, door, or
108
+ death "removes" a light (a real pilot game froze ~3 s per relic collected
109
+ this way). Turn a light off by driving `intensity` to 0 and leave it in the
110
+ graph; per-level swaps rebuild the whole scene anyway, which is the one
111
+ legitimate time the population changes.
104
112
  - Couple a practical to its emitter: one color, one envelope, one on/off state.
105
113
  - The key owns shadows; practicals cast none until a shot proves they must.
106
114
  - Tune intensities only after the renderer baseline is locked — retuning the