three-stdlib 2.23.13 → 2.23.15

Sign up to get free protection for your applications and to get access to all the features.
@@ -150,13 +150,16 @@ class OrbitControls extends THREE.EventDispatcher {
150
150
  };
151
151
  this.update = (() => {
152
152
  const offset = new THREE.Vector3();
153
- const quat = new THREE.Quaternion().setFromUnitVectors(object.up, new THREE.Vector3(0, 1, 0));
153
+ const up = new THREE.Vector3(0, 1, 0);
154
+ const quat = new THREE.Quaternion().setFromUnitVectors(object.up, up);
154
155
  const quatInverse = quat.clone().invert();
155
156
  const lastPosition = new THREE.Vector3();
156
157
  const lastQuaternion = new THREE.Quaternion();
157
158
  const twoPI = 2 * Math.PI;
158
159
  return function update() {
159
160
  const position = scope.object.position;
161
+ quat.setFromUnitVectors(object.up, up);
162
+ quatInverse.copy(quat).invert();
160
163
  offset.copy(position).sub(scope.target);
161
164
  offset.applyQuaternion(quat);
162
165
  spherical.setFromVector3(offset);
@@ -148,13 +148,16 @@ class OrbitControls extends EventDispatcher {
148
148
  };
149
149
  this.update = (() => {
150
150
  const offset = new Vector3();
151
- const quat = new Quaternion().setFromUnitVectors(object.up, new Vector3(0, 1, 0));
151
+ const up = new Vector3(0, 1, 0);
152
+ const quat = new Quaternion().setFromUnitVectors(object.up, up);
152
153
  const quatInverse = quat.clone().invert();
153
154
  const lastPosition = new Vector3();
154
155
  const lastQuaternion = new Quaternion();
155
156
  const twoPI = 2 * Math.PI;
156
157
  return function update() {
157
158
  const position = scope.object.position;
159
+ quat.setFromUnitVectors(object.up, up);
160
+ quatInverse.copy(quat).invert();
158
161
  offset.copy(position).sub(scope.target);
159
162
  offset.applyQuaternion(quat);
160
163
  spherical.setFromVector3(offset);
@@ -1,4 +1,4 @@
1
- import { Loader, LoadingManager, ShapePath, BufferGeometry, Vector3, Shape } from 'three'
1
+ import { Loader, LoadingManager, ShapePath, BufferGeometry, Vector2, Shape } from 'three'
2
2
 
3
3
  export interface SVGResultPaths extends ShapePath {
4
4
  userData?:
@@ -44,13 +44,13 @@ export class SVGLoader extends Loader {
44
44
  miterLimit?: number,
45
45
  ): StrokeStyle
46
46
  static pointsToStroke(
47
- points: Vector3[],
47
+ points: Vector2[],
48
48
  style: StrokeStyle,
49
49
  arcDivisions?: number,
50
50
  minDistance?: number,
51
51
  ): BufferGeometry
52
52
  static pointsToStrokeWithBuffers(
53
- points: Vector3[],
53
+ points: Vector2[],
54
54
  style: StrokeStyle,
55
55
  arcDivisions?: number,
56
56
  minDistance?: number,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "three-stdlib",
3
- "version": "2.23.13",
3
+ "version": "2.23.15",
4
4
  "description": "stand-alone library of threejs examples",
5
5
  "keywords": [
6
6
  "three",