three-stdlib 2.24.2 → 2.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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;
@@ -25,6 +25,8 @@ declare class OrbitControls extends EventDispatcher {
25
25
  autoRotate: boolean;
26
26
  autoRotateSpeed: number;
27
27
  reverseOrbit: boolean;
28
+ reverseHorizontalOrbit: boolean;
29
+ reverseVerticalOrbit: boolean;
28
30
  keys: {
29
31
  LEFT: string;
30
32
  UP: string;
@@ -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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "three-stdlib",
3
- "version": "2.24.2",
3
+ "version": "2.25.0",
4
4
  "description": "stand-alone library of threejs examples",
5
5
  "keywords": [
6
6
  "three",