From b49c27f282f0e0a6318d286e60cdfa96c19ce511 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=9D=89=E6=81=AF?= Date: Tue, 4 Aug 2026 20:02:31 +0800 Subject: [PATCH] docs(templates): keep 3D smoke bridge read-only A generated v1.3 game shipped teleport and time mutation hooks solely to make verification easy. Freeze the existing probe surface and require completion evidence through real browser input so acceptance measures gameplay instead of a debug backdoor. --- .../docs/modules/threed_basic/template_api.md | 13 +++++++++++++ .../docs/modules/threed_basic/threed_basic.md | 6 +++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/agent-test/docs/modules/threed_basic/template_api.md b/agent-test/docs/modules/threed_basic/template_api.md index 9ca0949b7..2049f5e13 100644 --- a/agent-test/docs/modules/threed_basic/template_api.md +++ b/agent-test/docs/modules/threed_basic/template_api.md @@ -31,6 +31,19 @@ Required public methods: | `isPaused()` | smoke/lifecycle observable pause state | | `resize()` | update camera aspect and renderer size | +## Smoke bridge + +`window.__opengame3d` is an exact, read-only probe surface: + +```ts +{ isPaused: () => boolean; renderer: 'three.js' } +``` + +Do not add `teleport`, time setters, collectible setters, mutable `state`, or +other gameplay shortcuts. Build, pause, completion, failure, and restart must +be verified through keyboard/mouse events and the visible DOM. Test time limits +with browser clock control or a pure unit check, not a shipped runtime setter. + ## SceneMap `initSceneMap()` returns `playerSpawn`, `floorPatches`, `collectibles`, and `obstacles`. diff --git a/agent-test/docs/modules/threed_basic/threed_basic.md b/agent-test/docs/modules/threed_basic/threed_basic.md index 7e6c11c1a..a450064da 100644 --- a/agent-test/docs/modules/threed_basic/threed_basic.md +++ b/agent-test/docs/modules/threed_basic/threed_basic.md @@ -12,7 +12,7 @@ and the one level rather than replacing the shell. | 2 | edit `SceneMap.ts` | main route and every pickup are reachable; obstacle collision radii leave a traversable lane | | 3 | merge tuning into `gameConfig.json` | every leaf has one runtime consumer; superseded aliases are deleted | | 4 | theme materials and DOM text | canvas remains WebGL-only; HUD remains DOM-only | -| 5 | run build and smoke | zero errors, non-black canvas, WebGL context, ESC resume | +| 5 | run build and smoke | zero errors, non-black canvas, WebGL context, ESC resume; smoke bridge remains read-only | ## Runtime lifecycle @@ -49,6 +49,10 @@ playable; it does not authorize skipping the required asset call. ## Manual play check +Keep the scaffolded `window.__opengame3d` surface exact: `isPaused` and +`renderer` only. Never add teleport, time/state setters, or collectible cheats +to make this check pass. + 1. Press Enter on the title screen. 2. Move with W/A/S/D or arrow keys; drag the mouse to look. 3. Press ESC, confirm the pause overlay, then ESC again and confirm movement.