feat: support glb model assets

This commit is contained in:
Tom Boullay
2026-04-29 16:18:24 +02:00
parent ad6f1552c6
commit 95e7e9c0a5
9 changed files with 59 additions and 36 deletions
+3 -3
View File
@@ -57,7 +57,7 @@ src/
`src/controls/editor/FlyController.tsx` provides editor movement controls for player-style navigation.
`src/utils/loadMapSceneData.ts` is shared by the game map and editor. It loads `/map.json` and resolves available `public/models/{name}/model.gltf` files.
`src/utils/loadMapSceneData.ts` is shared by the game map and editor. It loads `/map.json` and resolves available `public/models/{name}/model.glb` files first, then falls back to `public/models/{name}/model.gltf`.
`src/utils/editor/loadEditorScene.ts` contains editor-only upload handling for user-selected folders.
@@ -96,10 +96,10 @@ public/
├── map.json
└── models/
└── pylone/
└── model.gltf
└── model.glb
```
If a model is missing, the editor renders a fallback cube so the node can still be selected and transformed.
If `model.glb` and `model.gltf` are both missing, the editor renders a fallback cube so the node can still be selected and transformed.
## Editor Flow