From eca977ebcfd7cae9fec0da2acc9d3c983635784e Mon Sep 17 00:00:00 2001 From: bakedpotatolord Date: Mon, 28 Apr 2025 19:51:50 -0600 Subject: [PATCH] stop widget.modified from being set to false --- src/kiri/widget.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/kiri/widget.js b/src/kiri/widget.js index cc7afa3a..9d2aff9b 100644 --- a/src/kiri/widget.js +++ b/src/kiri/widget.js @@ -60,6 +60,7 @@ class Widget { this.slices = null; this.settings = null; // used?? this.modified = true; + this.boundingBoxNeedsUpdate = true this.track = { // box size for packer box: { @@ -229,6 +230,7 @@ class Widget { setModified() { this.modified = true; + this.boundingBoxNeedsUpdate if (this.mesh && this.mesh.geometry) { // this fixes ray intersections after the mesh is modified this.mesh.geometry.boundingSphere = null; @@ -695,9 +697,9 @@ class Widget { } getBoundingBox(refresh) { - if (!this.bounds || refresh || this.modified) { + if (!this.bounds || refresh || this.boundingBoxNeedsUpdate) { this.bounds = new THREE.Box3().setFromArray(this.getGeoVertices()); - this.modified = false; + this.boundingBoxNeedsUpdate = false; } return this.bounds; }