clone bounds to prevent altering cached object during platform bounds computation
This commit is contained in:
parent
7b4d9064e0
commit
9cd7f52f5c
2 changed files with 1 additions and 2 deletions
|
|
@ -1683,7 +1683,6 @@ function updateStock() {
|
|||
const { x, y, z, center } = stock;
|
||||
|
||||
UI.func.animate.classList.add('disabled');
|
||||
|
||||
if (x && y && z) {
|
||||
UI.func.animate.classList.remove('disabled');
|
||||
if (!camStock) {
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue