update : add map model + octree algo
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user