From 318a285b609622e80ccdbd184c64b5fc9f5239b3 Mon Sep 17 00:00:00 2001 From: Tanish Manku Date: Fri, 1 May 2026 00:09:16 -0700 Subject: [PATCH] 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. --- .../apps/artcraft/app/src/pages/PageScene/engine/editor.ts | 1 - .../app/src/pages/PageScene/engine/keybinds_controls.ts | 6 ------ 2 files changed, 7 deletions(-) diff --git a/frontend/apps/artcraft/app/src/pages/PageScene/engine/editor.ts b/frontend/apps/artcraft/app/src/pages/PageScene/engine/editor.ts index 5c42e0a6d2..9911a8efa7 100644 --- a/frontend/apps/artcraft/app/src/pages/PageScene/engine/editor.ts +++ b/frontend/apps/artcraft/app/src/pages/PageScene/engine/editor.ts @@ -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, diff --git a/frontend/apps/artcraft/app/src/pages/PageScene/engine/keybinds_controls.ts b/frontend/apps/artcraft/app/src/pages/PageScene/engine/keybinds_controls.ts index 836705fe29..218bcc01c3 100644 --- a/frontend/apps/artcraft/app/src/pages/PageScene/engine/keybinds_controls.ts +++ b/frontend/apps/artcraft/app/src/pages/PageScene/engine/keybinds_controls.ts @@ -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) => {