forked from ppfun/pixelplanet
clean up 3d controls
This commit is contained in:
parent
8266789fe3
commit
94f872e536
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user