clean up 3d controls

This commit is contained in:
HF 2024-01-23 16:06:59 +01:00
parent 8266789fe3
commit 94f872e536

View File

@ -682,23 +682,13 @@ class VoxelPainterControls {
panOffset.set(0, 0, 0); panOffset.set(0, 0, 0);
} }
target.add(panOffset); target.add(panOffset);
/*
if (scope.target.y < 10.0) {
scope.target.y = 10.0;
}
*/
// clamp to boundaries // clamp to boundaries
const bound = state.canvas.canvasSize / 2; const bound = state.canvas.canvasSize / 2;
target.clamp({ target.clamp(
x: -bound, { x: -bound, y: 0, z: -bound },
y: 0, { x: bound, y: THREE_CANVAS_HEIGHT, z: bound },
z: -bound, );
}, {
x: bound,
y: THREE_CANVAS_HEIGHT,
z: bound,
});
offset.setFromSpherical(spherical); offset.setFromSpherical(spherical);