From cb86716a25fbaa1f0e1c8e7cf0db97efcef6552f Mon Sep 17 00:00:00 2001 From: casperlamboo Date: Wed, 6 Dec 2017 12:04:44 +0100 Subject: [PATCH] update three js version --- package-lock.json | 20 +++++++++++++++++--- package.json | 2 +- src/d3/SelectionBox.js | 10 ++++------ 3 files changed, 22 insertions(+), 10 deletions(-) diff --git a/package-lock.json b/package-lock.json index 46e4e8d..35c7726 100644 --- a/package-lock.json +++ b/package-lock.json @@ -42,6 +42,13 @@ "requires": { "jszip": "3.1.5", "three": "0.83.0" + }, + "dependencies": { + "three": { + "version": "0.83.0", + "resolved": "https://registry.npmjs.org/three/-/three-0.83.0.tgz", + "integrity": "sha1-O3+UeQrz4CHawfRKJhdWnKIDKws=" + } } }, "@doodle3d/threejs-export-stl": { @@ -51,6 +58,13 @@ "requires": { "babel-preset-env": "1.6.1", "three": "0.83.0" + }, + "dependencies": { + "three": { + "version": "0.83.0", + "resolved": "https://registry.npmjs.org/three/-/three-0.83.0.tgz", + "integrity": "sha1-O3+UeQrz4CHawfRKJhdWnKIDKws=" + } } }, "@doodle3d/touch-events": { @@ -8898,9 +8912,9 @@ } }, "three": { - "version": "0.83.0", - "resolved": "https://registry.npmjs.org/three/-/three-0.83.0.tgz", - "integrity": "sha1-O3+UeQrz4CHawfRKJhdWnKIDKws=" + "version": "0.88.0", + "resolved": "https://registry.npmjs.org/three/-/three-0.88.0.tgz", + "integrity": "sha1-QlbC/Djk+yOg0j66K2zOTfjkZtU=" }, "three-js-csg": { "version": "github:Doodle3D/three-js-csg#a36f23da6e9be2405a9094de5709cb0ae8f58045" diff --git a/package.json b/package.json index e910f97..f9536d2 100755 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "reselect": "^3.0.1", "semver": "^5.4.1", "shortid": "^2.2.8", - "three": "^0.83.0", + "three": "^0.88.0", "three-js-csg": "github:Doodle3D/three-js-csg", "valid-url": "^1.0.9" }, diff --git a/src/d3/SelectionBox.js b/src/d3/SelectionBox.js index 803b0b8..02f964d 100644 --- a/src/d3/SelectionBox.js +++ b/src/d3/SelectionBox.js @@ -9,11 +9,6 @@ export default class SelectionBox extends THREE.Object3D { constructor() { super(); - this._box = new THREE.BoxHelper(); - - this._box.material.color.setHex(0x72bcd4); - this._box.name = 'bounding-box'; - const material = new THREE.MeshBasicMaterial(); const geometry = new THREE.BoxGeometry(1, 1, 1); @@ -23,7 +18,8 @@ export default class SelectionBox extends THREE.Object3D { const mesh = new THREE.Mesh(geometry, material); - this._box.update(mesh); + this._box = new THREE.BoxHelper(mesh, 0x72bcd4); + this._box.name = 'bounding-box'; this.add(this._box); } @@ -62,5 +58,7 @@ export default class SelectionBox extends THREE.Object3D { this._box.scale.y = this._boundingBox.max.y - this._boundingBox.min.y; this._box.position.y = this._boundingBox.min.y; + + this._box.updateMatrix(); } }