update : add map model + octree algo

This commit is contained in:
2026-04-17 11:36:03 +02:00
parent ed7681a293
commit 20fbaf05e1
10 changed files with 319 additions and 68 deletions
+15 -1
View File
@@ -1,5 +1,5 @@
import GUI from "lil-gui";
import type { CameraMode } from "@/types/debug";
import type { CameraMode, SceneMode } from "@/types/debug";
export class Debug {
private static instance: Debug | null = null;
@@ -12,9 +12,11 @@ export class Debug {
private readonly controls: {
cameraMode: CameraMode;
showInteractionSpheres: boolean;
sceneMode: SceneMode;
} = {
cameraMode: "player",
showInteractionSpheres: false,
sceneMode: "game",
};
static getInstance(): Debug {
@@ -42,6 +44,14 @@ export class Debug {
this.emit();
});
folder
.add(this.controls, "sceneMode", { Game: "game", Physics: "physics" })
.name("Scene")
.onChange((value: SceneMode) => {
this.controls.sceneMode = value;
this.emit();
});
folder
.add(this.controls, "showInteractionSpheres")
.name("Interaction Spheres")
@@ -86,6 +96,10 @@ export class Debug {
return this.controls.cameraMode;
}
getSceneMode(): SceneMode {
return this.controls.sceneMode;
}
getShowInteractionSpheres(): boolean {
return this.controls.showInteractionSpheres;
}