stop widget.modified from being set to false
This commit is contained in:
parent
6a862fa2f9
commit
eca977ebcf
1 changed files with 4 additions and 2 deletions
|
|
@ -60,6 +60,7 @@ class Widget {
|
||||||
this.slices = null;
|
this.slices = null;
|
||||||
this.settings = null; // used??
|
this.settings = null; // used??
|
||||||
this.modified = true;
|
this.modified = true;
|
||||||
|
this.boundingBoxNeedsUpdate = true
|
||||||
this.track = {
|
this.track = {
|
||||||
// box size for packer
|
// box size for packer
|
||||||
box: {
|
box: {
|
||||||
|
|
@ -229,6 +230,7 @@ class Widget {
|
||||||
|
|
||||||
setModified() {
|
setModified() {
|
||||||
this.modified = true;
|
this.modified = true;
|
||||||
|
this.boundingBoxNeedsUpdate
|
||||||
if (this.mesh && this.mesh.geometry) {
|
if (this.mesh && this.mesh.geometry) {
|
||||||
// this fixes ray intersections after the mesh is modified
|
// this fixes ray intersections after the mesh is modified
|
||||||
this.mesh.geometry.boundingSphere = null;
|
this.mesh.geometry.boundingSphere = null;
|
||||||
|
|
@ -695,9 +697,9 @@ class Widget {
|
||||||
}
|
}
|
||||||
|
|
||||||
getBoundingBox(refresh) {
|
getBoundingBox(refresh) {
|
||||||
if (!this.bounds || refresh || this.modified) {
|
if (!this.bounds || refresh || this.boundingBoxNeedsUpdate) {
|
||||||
this.bounds = new THREE.Box3().setFromArray(this.getGeoVertices());
|
this.bounds = new THREE.Box3().setFromArray(this.getGeoVertices());
|
||||||
this.modified = false;
|
this.boundingBoxNeedsUpdate = false;
|
||||||
}
|
}
|
||||||
return this.bounds;
|
return this.bounds;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue