diff --git a/package-lock.json b/package-lock.json index a07ef176bd..17b4305f90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9073,9 +9073,9 @@ "dev": true }, "three": { - "version": "0.105.2", - "resolved": "https://registry.npmjs.org/three/-/three-0.105.2.tgz", - "integrity": "sha512-L3Al37k4g3hVbgFFS251UVtIc25chhyN0/RvXzR0C+uIBToV6EKDG+MZzEXm9L2miGUVMK27W46/VkP6WUZXMg==", + "version": "0.106.2", + "resolved": "https://registry.npmjs.org/three/-/three-0.106.2.tgz", + "integrity": "sha512-4Tlx43uoxnIaZFW2Bzkd1rXsatvVHEWAZJy8LuE+s6Q8c66ogNnhfq1bHiBKPAnXP230LD11H/ScIZc2LZMviA==", "dev": true }, "through": { diff --git a/package.json b/package.json index 71b798bd20..4204e6a0f5 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ }, "peerDependencies": { "proj4": "^2.5.0", - "three": "^0.105.2" + "three": "^0.106.2" }, "devDependencies": { "@babel/cli": "^7.4.4", @@ -84,7 +84,7 @@ "proj4": "^2.5.0", "puppeteer": "^1.18.1", "replace-in-file": "^4.1.0", - "three": "^0.105.2", + "three": "^0.106.2", "url-polyfill": "^1.1.5", "webpack": "^4.35.2", "webpack-cli": "^3.3.5", diff --git a/src/Utils/CameraUtils.js b/src/Utils/CameraUtils.js index 2432693e79..de6b8c8db5 100644 --- a/src/Utils/CameraUtils.js +++ b/src/Utils/CameraUtils.js @@ -96,9 +96,9 @@ class CameraRig extends THREE.Object3D { // apply rig.camera's transformation to camera applyTransformToCamera(view, camera) { if (this.proxy) { - camera.quaternion.onChange(() => {}); + camera.quaternion._onChange(() => {}); this.camera.matrixWorld.decompose(this.proxy.position, camera.quaternion, camera.scale); - camera.quaternion.onChange(() => this.removeProxy(view, camera)); + camera.quaternion._onChange(() => this.removeProxy(view, camera)); } else { this.camera.matrixWorld.decompose(camera.position, camera.quaternion, camera.scale); } @@ -108,7 +108,7 @@ class CameraRig extends THREE.Object3D { if (!this.proxy && view && camera) { this.proxy = { position: new THREE.Vector3() }; Object.keys(camera.position).forEach(key => proxyProperty(view, camera, this, key)); - camera.quaternion.onChange(() => this.removeProxy(view, camera)); + camera.quaternion._onChange(() => this.removeProxy(view, camera)); } } @@ -116,7 +116,7 @@ class CameraRig extends THREE.Object3D { this.stop(view); if (this.proxy && view && camera) { Object.keys(camera.position).forEach(key => Object.defineProperty(camera.position, key, { value: this.proxy.position[key], writable: true })); - camera.quaternion.onChange(() => {}); + camera.quaternion._onChange(() => {}); this.proxy = null; } }