Skip to content

fix(templates): stabilize 3D browser shell - #51

Closed
wh000wh000 wants to merge 14 commits into
leigest519:mainfrom
wh000wh000:fix/threed-v1-5-browser-shell
Closed

fix(templates): stabilize 3D browser shell#51
wh000wh000 wants to merge 14 commits into
leigest519:mainfrom
wh000wh000:fix/threed-v1-5-browser-shell

Conversation

@wh000wh000

Copy link
Copy Markdown

结论

Core3d now has a deterministic browser shell: repeated Escape cannot toggle pause twice, completed/failed games cannot be resumed, and favicon loading uses a real relative file instead of inline data.

Product-code evidence

Finding Generated code Template gap Runtime consequence
ESC repeat/end lock ember-skyway-relics-3d-v1-4/src/main.ts:37 core3d/src/main.ts accepted every Escape held Escape randomly toggled pause; end overlays could resume simulation
Missing path favicon v1.4 index.html:3-7 had no icon core3d had no public/favicon.* independent browser emitted a 404
Inline workaround Crystal v1.2 used href="data:," no canonical path asset hid the 404 by embedding data in editable HTML

Change

Path Change
agent-test/templates/core3d/src/main.ts Ignore event.repeat; lock Escape after completion/failure
agent-test/templates/core3d/index.html Reference ./favicon.svg
agent-test/templates/core3d/public/favicon.svg Small text SVG asset; no Base64/Data URL

The complementary non-Git smoke change adds opt-in --shell-contract: repeated Escape must preserve pause and the icon must be a non-data path returning 200. Default historical 2D/3D smoke behavior is unchanged.

Verification

Gate Result
Fresh core3d npm ci && npm run build PASS
smoke --esc-rounds 2 --shell-contract PASS: WebGL/non-black/errors0, repeat stable, favicon 200
Crystal v1.2 negative Expected FAIL under opt-in: repeat changed pause and data:, icon rejected
Crystal v1.2 default smoke PASS
Base64/Data URL scan of new template 0

Risk and rollback

The changes affect only the 3D shell. Phaser templates and default smoke semantics are untouched. Revert 4e4fdf5 for the icon path or ab0c546 for lifecycle behavior independently.

Upstream dependencies: #47-#50.

蝉息 and others added 14 commits August 4, 2026 17:17
Add the frozen classifier/GDD contract for a minimal three.js archetype while preserving every existing Phaser route. Includes regression fixtures for explicit 3D, 2D platformer, and 2D top-down prompts.
Provide the core3d skeleton, threed_basic gameplay layer, pinned npm lockfile, and builder-facing manuals. The template keeps DOM lifecycle screens and the three-key ESC fallback while limiting assets to the existing image pipeline.
feat(3d): add threed_basic v1 production path
Keep the player on authored floor patches and outside explicit static obstacle circles without introducing a physics dependency. Substepped resolution prevents high-delta tunnelling and the self-check covers road, obstacle, and slide behavior.
Teach the builder to preserve the pure XZ resolver, explicit collision radii, and v1 no-physics boundary so generated games consume the new capability instead of bypassing it.
feat(templates): add threed_basic manual collision
The three.js renderer sizes from its container and never consumes the inherited 2D reference dimensions. Removing the unused leaves gives both standalone core3d and threed_basic a zero-dead-config baseline.
Generated v1.1 code duplicated fog, pickup, and count values. Make the builder keep one canonical path per runtime value, remove superseded aliases, and record the leaf-to-consumer map in GDD completion notes.
The universal GDD reminder contradicted threed_basic zero-dead-config rules by forbidding deletion of inherited fields. Keep the Phaser reminder unchanged while requiring consumed, single-source leaves for 3D.
fix(templates): enforce consumed 3D config
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.
…bridge

docs(templates): keep 3D smoke bridge read-only
A real v1.4 game showed repeated Escape events can toggle pause multiple times and end screens can resume gameplay. Ignore keyboard repeats and lock the runtime after completion or failure.
Real-browser review found the core3d shell requests an undeclared favicon. Ship a tiny standalone SVG and reference it relatively, keeping binary data out of editable HTML.
@wh000wh000

Copy link
Copy Markdown
Author

Superseded by #57, which rebases the complete threed_basic v1 milestone onto current origin/main and excludes unrelated fork-only changes.

@wh000wh000 wh000wh000 closed this Aug 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant