PageScene: drop spacebar handler from MouseControls

The spacebar branch in onkeydown called switchCameraView; remove it
along with the now-unused switchCameraView callback param/field. Editor
no longer passes that arg into MouseControls' constructor.
This commit is contained in:
Tanish Manku committed 2026-05-01 00:09:16 -07:00
1 parent bccdd8df5b
commit 318a285b60
2 files changed
-7

No files matched your search

@@ -377,7 +377,6 @@ class Editor {
this.cameraController.freeCamState,
this.cameraController.lockControls,
this.cameraController.camera_last_pos,
this.cameraController.switchCameraView.bind(this.cameraController),
this.deleteObject.bind(this),
this.viewport.canvReference,
this.mouse,
@@ -57,7 +57,6 @@ export class MouseControls {
camera_last_pos: THREE.Vector3;
selected: THREE.Object3D[] | undefined;
orbitControls: OrbitControls | undefined;
switchCameraView: Function;
deleteObject: Function;
canvReference: HTMLCanvasElement | null = null;
mouse: THREE.Vector2 | undefined;
@@ -90,7 +89,6 @@ export class MouseControls {
cameraViewControls: FreeCamControlState | null,
lockControls: PointerLockControls | undefined,
camera_last_pos: THREE.Vector3,
switchCameraView: Function,
deleteObject: Function,
canvReference: HTMLCanvasElement | null,
mouse: THREE.Vector2 | undefined,
@@ -114,7 +112,6 @@ export class MouseControls {
this.lockControls = lockControls;
this.camera_last_pos = camera_last_pos;
this.selected = [];
this.switchCameraView = switchCameraView;
this.deleteObject = deleteObject;
this.canvReference = canvReference;
this.mouse = mouse;
@@ -295,9 +292,6 @@ export class MouseControls {
} else if (event.key === "f" && this.selected && this.lockControls) {
this.focus();
return;
} else if (event.key === " ") {
this.switchCameraView();
return;
} else if (event.key === "Backspace" || event.key === "Delete") {
if (this.selected) {
this.selected.forEach((selected) => {