refactor: move game map into world folder
This commit is contained in:
@@ -13,7 +13,7 @@ This document describes the code that exists today in the repository.
|
||||
- debug helpers and debug camera mode
|
||||
- either the map scene or the debug physics test scene
|
||||
- the player rig when the active camera mode is `player`
|
||||
- `src/components/game/GameMap.tsx` loads map nodes from `public/map.json`, resolves available models, and builds the collision octree.
|
||||
- `src/world/GameMap.tsx` loads map nodes from `public/map.json`, resolves available models, and builds the collision octree.
|
||||
- `src/world/debug/TestScene.tsx` provides a debug-oriented interaction and physics scene.
|
||||
- `src/world/player/PlayerComponent.tsx` mounts the camera and controller.
|
||||
- `src/world/player/PlayerController.tsx` owns pointer lock movement, jump handling, and interaction input.
|
||||
@@ -50,7 +50,7 @@ This document describes the code that exists today in the repository.
|
||||
- `src/features/editor/controls/FlyController.tsx` provides player-style editor navigation.
|
||||
- `src/features/editor/hooks/useEditorSceneData.ts` loads scene data and handles folder upload fallback.
|
||||
- `src/features/editor/hooks/useEditorHistory.ts` owns editor undo and redo state.
|
||||
- `src/features/editor/utils/loadEditorScene.ts` handles editor-only folder upload parsing.
|
||||
- `src/utils/editor/loadEditorScene.ts` handles editor-only folder upload parsing.
|
||||
- `src/utils/loadMapSceneData.ts` is shared by the game scene and editor to load `public/map.json` and resolve model URLs.
|
||||
- `src/types/editor.ts` contains the shared `MapNode`, `SceneData`, and `TransformMode` types.
|
||||
|
||||
|
||||
@@ -32,11 +32,11 @@ src/
|
||||
│ ├── scene/
|
||||
│ │ ├── EditorMap.tsx
|
||||
│ │ └── EditorScene.tsx
|
||||
│ └── utils/
|
||||
│ └── loadEditorScene.ts
|
||||
├── types/
|
||||
│ └── editor.ts
|
||||
└── utils/
|
||||
├── editor/
|
||||
│ └── loadEditorScene.ts
|
||||
└── loadMapSceneData.ts
|
||||
```
|
||||
|
||||
@@ -58,7 +58,7 @@ src/
|
||||
|
||||
`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/features/editor/utils/loadEditorScene.ts` contains editor-only upload handling for user-selected folders.
|
||||
`src/utils/editor/loadEditorScene.ts` contains editor-only upload handling for user-selected folders.
|
||||
|
||||
## Data Format
|
||||
|
||||
|
||||
Reference in New Issue
Block a user