1.8 KiB
1.8 KiB
Implemented Architecture
This document describes the code that exists today in the repository.
Runtime Structure
src/App.tsxmounts theCanvas, the 3DWorld, the debug perf overlay, and the HTML crosshair overlay.src/world/World.tsxcomposes the active 3D scene.src/world/Map.tsxloads and centers the blocking map model.src/world/Lighting.tsxowns the current ambient and directional light setup.src/world/Environment.tsxowns the current background color.src/world/player/FPSController.tsxprovides the current player camera, pointer lock, andZQSDmovement.src/utils/debug/contains debug-only tooling such aslil-gui, scene helpers, and the free debug camera.src/components/ui/Crosshair.tsxis the only current HTML overlay component in use.
Camera Modes
The application currently has two camera modes:
player- controlled by
FPSController - player height is
1.75m - movement uses
ZQSD Eis reserved for future interaction
- controlled by
debug- controlled by
DebugCameraControls - enabled from the debug panel
- controlled by
The active mode is stored in the debug subsystem and consumed through src/hooks/debug/useCameraMode.ts.
Debug System
src/utils/debug/Debug.tsis a singleton wrapper aroundlil-guisrc/utils/debug/DebugPerf.tsxlazy-loadsr3f-perfsrc/utils/debug/scene/DebugHelpers.tsxmounts grid and axes in debug modesrc/utils/debug/scene/DebugCameraControls.tsxmounts the free camera in debug mode
Current Limitations
- There is no gameplay state manager implemented yet.
- There are no zone systems, missions, dialogue systems, or cinematic systems implemented yet.
- Player movement currently uses a simple height clamp instead of real collision or ground detection.
- The map is currently a blocking preview scene, not a full playable world.