fix: flickering hands

This commit is contained in:
Tom Boullay
2026-05-06 23:16:58 +01:00
parent 7ae45d4cfa
commit 553dc6eb0a
3 changed files with 56 additions and 19 deletions
+21
View File
@@ -53,6 +53,7 @@ export class Debug {
private readonly controls: {
cameraMode: CameraMode;
showDebugOverlay: boolean;
showHandTrackingSvg: boolean;
showInteractionSpheres: boolean;
showPerf: boolean;
sceneMode: SceneMode;
@@ -73,6 +74,7 @@ export class Debug {
this.controls = {
cameraMode: storedControls.cameraMode ?? "player",
showDebugOverlay: true,
showHandTrackingSvg: false,
showInteractionSpheres: false,
showPerf: true,
sceneMode: storedControls.sceneMode ?? "game",
@@ -116,6 +118,16 @@ export class Debug {
this.controls.showDebugOverlay = value;
this.emit();
});
const handTrackingFolder = this.createFolder("Hand Tracking");
handTrackingFolder
?.add(this.controls, "showHandTrackingSvg")
.name("Afficher SVG")
.onChange((value: boolean) => {
this.controls.showHandTrackingSvg = value;
this.emit();
});
}
}
@@ -179,6 +191,15 @@ export class Debug {
return this.controls.showInteractionSpheres;
}
getShowHandTrackingSvg(): boolean {
return this.controls.showHandTrackingSvg;
}
setShowHandTrackingSvg(value: boolean): void {
this.controls.showHandTrackingSvg = value;
this.emit();
}
setShowInteractionSpheres(value: boolean): void {
this.controls.showInteractionSpheres = value;
this.emit();