fix multi-widget bounding box accuracy

This commit is contained in:
bakedpotatolord 2025-07-21 21:25:31 -06:00
commit e8ba6aa492

View file

@ -49,8 +49,13 @@ function update_info() {
const ui = api.ui;
let bounds = new THREE.Box3(), track;
for_meshes(mesh => {
bounds = bounds.union(mesh.getBoundingBox());
let box = mesh.getBoundingBox().clone();
track = mesh.widget.track;
let {pos} = track
box.min.add(pos);
box.max.add(pos);
console.log(structuredClone({pos}))
bounds = bounds.union(box);
});
if (bounds.min.x === Infinity) {
if (selectedMeshes.length === 0) {