clone bounds to prevent altering cached object during platform bounds computation

This commit is contained in:
Stewart Allen 2022-11-12 19:30:47 -05:00
commit 9cd7f52f5c
2 changed files with 1 additions and 2 deletions

View file

@ -197,7 +197,7 @@ function platformUpdateBounds() {
const bounds = new THREE.Box3();
api.widgets.each(widget => {
let wp = widget.track.pos;
let wb = widget.getBoundingBox();
let wb = widget.getBoundingBox().clone();
wb.min.x += wp.x;
wb.max.x += wp.x;
wb.min.y += wp.y;