Fix game imports from Stem Script based projects#20
Merged
Conversation
…ayground smokes - scene/v2.ts: derive showHud from persisted userData.game (default false) instead of hardcoding true, so the HUD is opt-in and no longer appears on every reload/replay. - CLAUDE.md: document that editor lifecycle hooks run without init(), the erth-undefined crash class, and that gameObject has no .game. - EngineRuntime.ts: clarify HUD teardown is owned by game.reset()->hud.clear(). - Add Playwright smokes: solar-system playground, HUD replay-leak, and a generic all-games playground harness. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sync game settings booleans to scene data
Brings in PR #19 (Pirate game import fixes) plus README/team updates. Conflict in script-tool/ImportBatchDialog.ts (autoResolveImports): both sides reworked the per-import extension matching. Kept HEAD's shared `extOf` predicate, which the rest of the function depends on (filepath match at folderFiles.filter(extOf) and the claimed-filtered fuzzy fallback that redeclares its own local `extMatches`). origin's two intents are already covered on this branch: reusing a claimed model file across multiple imports is handled by resolving filepath against the full unfiltered list, and the no-extension-match case is skipped naturally downstream. Added a comment recording why.
The script-tool model import hardcoded "application/zip" as the source
container for every model, forcing all files through JSZip's expandZip.
That only works for models bundled as real ZIP archives (e.g. pirate-ship
.glb files are PK\x03\x04 zips of model + textures). Raw .glb/.gltf/.fbx/
.obj files (100-cars, 3d-chess) failed with "Can't find end of central
directory" and returned {success:false} per model WITHOUT throwing, so the
script kept running, behaviors still imported, and exec reported "done".
Across a mixed library this looked like "about half the models and
behaviors silently don't import" — behaviors that reference the missing
models then appear broken downstream.
Fix: sniff the first 4 bytes and pass "application/zip" only for true
PK\x03\x04 archives, "" otherwise — so zip-wrapped models keep their exact
path and raw model files load directly with their companion files. This
matches every other loadModelFromFile caller, which lets the function
auto-detect the container.
Verified via persisted-scene introspection:
- 3d-chess: 0 -> 6/6 models + 6 model assets
- 100-cars: 0 -> 11/11 models + 11 model assets
- pirate-ship: zip path unchanged (logs confirm expandZip + texture
overrides + convertToGlb running normally)
Also includes related in-progress OSS import work (behavior dedup,
asset-revision stability, image-derivative fallback) and the
repro-import-inspect.mjs harness used to diagnose this.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Quick start listed the Bun/Go/Node prerequisites but never said how to install them per platform. Add a "Setting up your dev environment" section with install steps for macOS (Homebrew), Linux (bun script + nvm + Go tarball), and Windows (WSL2 recommended, since the npm scripts use inline BUILD_MODE=oss env prefixes and .sh deploy scripts that don't run under native cmd/PowerShell), plus a verify step. Cross-link with Quick start. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Reuse duplicate model assets during batch imports and report unresolved or stalled imports instead of silently skipping them. Surface corrupt or missing persisted assets as save/load failures, stop mirroring large scene drafts into localStorage, and keep focused tests/playwright diagnostics with the change.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.