From 94f872e536f2feda9b10cd388a7552dc0e33a80e Mon Sep 17 00:00:00 2001 From: HF Date: Tue, 23 Jan 2024 16:06:59 +0100 Subject: [PATCH] clean up 3d controls --- src/controls/VoxelPainterControls.js | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/controls/VoxelPainterControls.js b/src/controls/VoxelPainterControls.js index 2f24dfb4..5872e610 100644 --- a/src/controls/VoxelPainterControls.js +++ b/src/controls/VoxelPainterControls.js @@ -682,23 +682,13 @@ class VoxelPainterControls { panOffset.set(0, 0, 0); } target.add(panOffset); - /* - if (scope.target.y < 10.0) { - scope.target.y = 10.0; - } - */ // clamp to boundaries const bound = state.canvas.canvasSize / 2; - target.clamp({ - x: -bound, - y: 0, - z: -bound, - }, { - x: bound, - y: THREE_CANVAS_HEIGHT, - z: bound, - }); + target.clamp( + { x: -bound, y: 0, z: -bound }, + { x: bound, y: THREE_CANVAS_HEIGHT, z: bound }, + ); offset.setFromSpherical(spherical);