clean branch-scoped code quality issues

This commit is contained in:
2026-04-28 14:23:37 +02:00
parent 356bb5ef88
commit 324aa9dc0f
15 changed files with 218 additions and 242 deletions
+9 -9
View File
@@ -44,12 +44,12 @@ This document describes the code that exists today in the repository.
## Editor System
- `src/pages/editor/EditorPage.tsx` is the route-level editor page for `/editor`.
- `src/features/editor/components/EditorControls.tsx` renders the HTML editor control panel.
- `src/features/editor/scene/EditorScene.tsx` composes the editor canvas scene, camera controls, lights, shortcuts, and map rendering.
- `src/features/editor/scene/EditorMap.tsx` renders map nodes, fallback cubes, selection highlighting, and transform controls.
- `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/components/editor/EditorControls.tsx` renders the HTML editor control panel.
- `src/components/editor/scene/EditorScene.tsx` composes the editor canvas scene, camera controls, lights, shortcuts, and map rendering.
- `src/components/editor/scene/EditorMap.tsx` renders map nodes, fallback cubes, selection highlighting, and transform controls.
- `src/controls/editor/FlyController.tsx` provides player-style editor navigation.
- `src/hooks/editor/useEditorSceneData.ts` loads scene data and handles folder upload fallback.
- `src/hooks/editor/useEditorHistory.ts` owns editor undo and redo state.
- `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.
@@ -63,9 +63,9 @@ This document describes the code that exists today in the repository.
## Current Limitations
- The repository is still a prototype, not the full intended game runtime.
- `src/world/debug/TestScene.tsx` is still part of the active scene composition.
- There is no central gameplay orchestrator such as `GameManager` yet.
- The repository is a prototype, not the full intended game runtime.
- `src/world/debug/TestScene.tsx` is part of the active scene composition.
- There is no central gameplay orchestrator such as `GameManager`.
- Missions, zones, cinematics, and dialogue systems are not implemented.
- The player uses octree collision and simple movement rules, not a complete gameplay physics stack.
- Editor save-to-server is implemented as a Vite dev-server plugin, not a production backend API.
+20 -19
View File
@@ -20,18 +20,19 @@ src/
├── pages/
│ └── editor/
│ └── EditorPage.tsx
├── features/
├── components/
│ └── editor/
│ ├── components/
│ └── EditorControls.tsx
├── controls/
└── FlyController.tsx
│ ├── hooks/
│ ├── useEditorHistory.ts
│ └── useEditorSceneData.ts
│ ├── scene/
│ ├── EditorMap.tsx
│ └── EditorScene.tsx
│ ├── EditorControls.tsx
└── scene/
├── EditorMap.tsx
└── EditorScene.tsx
├── controls/
└── editor/
└── FlyController.tsx
├── hooks/
── editor/
├── useEditorHistory.ts
│ └── useEditorSceneData.ts
├── types/
│ └── editor.ts
└── utils/
@@ -44,17 +45,17 @@ src/
`src/pages/editor/EditorPage.tsx` is the route-level composition component. It owns route-specific state such as selected object, hovered object, transform mode, and player-mode toggle.
`src/features/editor/hooks/useEditorSceneData.ts` loads the default map data and handles folder uploads.
`src/hooks/editor/useEditorSceneData.ts` loads the default map data and handles folder uploads.
`src/features/editor/hooks/useEditorHistory.ts` owns editor undo and redo history.
`src/hooks/editor/useEditorHistory.ts` owns editor undo and redo history.
`src/features/editor/scene/EditorScene.tsx` composes the editor canvas scene, camera controls, lights, keyboard shortcuts, and `EditorMap`.
`src/components/editor/scene/EditorScene.tsx` composes the editor canvas scene, camera controls, lights, keyboard shortcuts, and `EditorMap`.
`src/features/editor/scene/EditorMap.tsx` renders map nodes, fallback cubes, selection highlighting, and transform controls.
`src/components/editor/scene/EditorMap.tsx` renders map nodes, fallback cubes, selection highlighting, and transform controls.
`src/features/editor/components/EditorControls.tsx` renders the HTML control panel outside the canvas.
`src/components/editor/EditorControls.tsx` renders the HTML control panel outside the canvas.
`src/features/editor/controls/FlyController.tsx` provides editor movement controls for player-style navigation.
`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.
@@ -138,6 +139,6 @@ Editor styles are in `src/index.css` under the `/* Editor page */` section. Clas
## Known Limitations
- Uploaded model object URLs are not currently revoked after replacement or unmount.
- Large `map.json` files may need virtualization, culling, or LOD support later.
- There is no snap-to-grid, duplication, material editing, or object creation workflow yet.
- Large `map.json` files are not virtualized, culled, or LOD-managed.
- There is no snap-to-grid, duplication, material editing, or object creation workflow.
- Save to Server is a Vite dev-server helper, not a production backend API.
+5 -5
View File
@@ -5,7 +5,7 @@ This document describes the intended medium-term architecture for the project.
## Relationship To The Current Code
- `docs/technical/architecture.md` is the source of truth for what exists now.
- This document is intentionally aspirational.
- This document describes intended direction, not implemented behavior.
- If this document conflicts with the current implementation, the current implementation wins.
## Goals
@@ -40,12 +40,12 @@ This document describes the intended medium-term architecture for the project.
- performance overlay
- scene helpers
- free camera and calibration controls
- temporary test scenes used during development
- debug test scenes used during development
### UI Layer
- `src/components/ui/` should contain player-facing HTML overlays.
- Expected future examples:
- Candidate examples:
- crosshair
- loading flow
- mission HUD
@@ -54,7 +54,7 @@ This document describes the intended medium-term architecture for the project.
### Gameplay Layer
- As the project grows, gameplay state can move toward a clearer orchestration layer.
- Likely future concerns:
- Likely concerns:
- missions
- zones
- cinematics
@@ -67,4 +67,4 @@ This document describes the intended medium-term architecture for the project.
- Prefer direct, working code over speculative scaffolding.
- Shared types should stay close to their domain until they have multiple real consumers.
- Avoid creating new managers or service layers without an active runtime need.
- Debug-only runtime paths should be clearly marked and easy to remove later.
- Debug-only runtime paths should be clearly marked and easy to remove when obsolete.
+2 -2
View File
@@ -72,12 +72,12 @@ This is useful for checking numeric transform values before saving or exporting.
`Save to server` is available only during local development. It writes the edited map back to `public/map.json` through the Vite dev-server endpoint.
The button is hidden in production builds because production persistence is not implemented yet.
The button is hidden in production builds because production persistence is not implemented.
## Current Limitations
- The editor only modifies existing nodes.
- It does not create or delete objects yet.
- It does not create or delete objects.
- It does not edit model files or textures.
- It does not provide production persistence.
- Fallback cubes indicate missing models; they are editor placeholders, not exported assets.