Skip to content

Commit

Permalink
chore: update THREE to r106.2
Browse files Browse the repository at this point in the history
  • Loading branch information
gchoqueux committed Jul 10, 2019
1 parent 69536f4 commit e51ea8f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
},
"peerDependencies": {
"proj4": "^2.5.0",
"three": "^0.105.2"
"three": "^0.106.2"
},
"devDependencies": {
"@babel/cli": "^7.4.4",
Expand Down Expand Up @@ -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",
Expand Down
8 changes: 4 additions & 4 deletions src/Utils/CameraUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand All @@ -108,15 +108,15 @@ 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));
}
}

removeProxy(view, camera) {
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;
}
}
Expand Down

0 comments on commit e51ea8f

Please sign in to comment.