three-stdlib 2.24.2 → 2.25.0
Sign up to get free protection for your applications and to get access to all the features.
@@ -60,6 +60,10 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
60
60
|
// 30 seconds per orbit when fps is 60
|
61
61
|
__publicField(this, "reverseOrbit", false);
|
62
62
|
// true if you want to reverse the orbit to mouse drag from left to right = orbits left
|
63
|
+
__publicField(this, "reverseHorizontalOrbit", false);
|
64
|
+
// true if you want to reverse the horizontal orbit direction
|
65
|
+
__publicField(this, "reverseVerticalOrbit", false);
|
66
|
+
// true if you want to reverse the vertical orbit direction
|
63
67
|
// The four arrow keys
|
64
68
|
__publicField(this, "keys", { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" });
|
65
69
|
// Mouse buttons
|
@@ -291,14 +295,14 @@ class OrbitControls extends THREE.EventDispatcher {
|
|
291
295
|
return Math.pow(0.95, scope.zoomSpeed);
|
292
296
|
}
|
293
297
|
function rotateLeft(angle) {
|
294
|
-
if (scope.reverseOrbit) {
|
298
|
+
if (scope.reverseOrbit || scope.reverseHorizontalOrbit) {
|
295
299
|
sphericalDelta.theta += angle;
|
296
300
|
} else {
|
297
301
|
sphericalDelta.theta -= angle;
|
298
302
|
}
|
299
303
|
}
|
300
304
|
function rotateUp(angle) {
|
301
|
-
if (scope.reverseOrbit) {
|
305
|
+
if (scope.reverseOrbit || scope.reverseVerticalOrbit) {
|
302
306
|
sphericalDelta.phi += angle;
|
303
307
|
} else {
|
304
308
|
sphericalDelta.phi -= angle;
|
@@ -58,6 +58,10 @@ class OrbitControls extends EventDispatcher {
|
|
58
58
|
// 30 seconds per orbit when fps is 60
|
59
59
|
__publicField(this, "reverseOrbit", false);
|
60
60
|
// true if you want to reverse the orbit to mouse drag from left to right = orbits left
|
61
|
+
__publicField(this, "reverseHorizontalOrbit", false);
|
62
|
+
// true if you want to reverse the horizontal orbit direction
|
63
|
+
__publicField(this, "reverseVerticalOrbit", false);
|
64
|
+
// true if you want to reverse the vertical orbit direction
|
61
65
|
// The four arrow keys
|
62
66
|
__publicField(this, "keys", { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" });
|
63
67
|
// Mouse buttons
|
@@ -289,14 +293,14 @@ class OrbitControls extends EventDispatcher {
|
|
289
293
|
return Math.pow(0.95, scope.zoomSpeed);
|
290
294
|
}
|
291
295
|
function rotateLeft(angle) {
|
292
|
-
if (scope.reverseOrbit) {
|
296
|
+
if (scope.reverseOrbit || scope.reverseHorizontalOrbit) {
|
293
297
|
sphericalDelta.theta += angle;
|
294
298
|
} else {
|
295
299
|
sphericalDelta.theta -= angle;
|
296
300
|
}
|
297
301
|
}
|
298
302
|
function rotateUp(angle) {
|
299
|
-
if (scope.reverseOrbit) {
|
303
|
+
if (scope.reverseOrbit || scope.reverseVerticalOrbit) {
|
300
304
|
sphericalDelta.phi += angle;
|
301
305
|
} else {
|
302
306
|
sphericalDelta.phi -= angle;
|