@genex-ai/cli-demo 0.73.0-dev.188 → 0.74.0-dev.191
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": "0.
|
|
3
|
+
"version": "0.74.0-dev.191",
|
|
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": {
|
|
@@ -297,11 +297,17 @@ the bundled `FollowCamera` get the lock free (on by default). A hand-rolled game
|
|
|
297
297
|
locks with ~6 lines, reusing this section's Escape flow:
|
|
298
298
|
|
|
299
299
|
```ts
|
|
300
|
+
// Once at setup (NOT inside the click handler — a fresh listener on every
|
|
301
|
+
// Resume stacks and multi-fires setPhase on a single unlock):
|
|
302
|
+
document.addEventListener("pointerlockchange", () => {
|
|
303
|
+
if (!document.pointerLockElement && phase === "playing") setPhase("paused");
|
|
304
|
+
});
|
|
300
305
|
// In the Play/Start/Resume CLICK handler (lock needs a user gesture):
|
|
301
306
|
canvas.requestPointerLock?.(); // hides the cursor, focuses the game
|
|
302
|
-
//
|
|
303
|
-
//
|
|
304
|
-
//
|
|
307
|
+
// Required (not optional): without Keyboard Lock, the browser consumes Esc to
|
|
308
|
+
// exit pointer lock and the keydown never reaches the page — the listener
|
|
309
|
+
// above is what pauses. The Resume click re-locks. Keyboard games need nothing
|
|
310
|
+
// more — no reticle, no aim code; the lock just parks the cursor.
|
|
305
311
|
```
|
|
306
312
|
|
|
307
313
|
If the lock is genuinely unavailable (a third-party embed without
|