开发:优化代码

pull/1475/head
ChenX 4 years ago
parent 6c3c593f79
commit 861613aa4a

@ -215,6 +215,7 @@ export function midPoint2(v1: Vector2, v2: Vector2): Vector2
return v1.clone().add(v2).multiplyScalar(0.5);
}
let tempBox = new Box3();
/**
* Three.
* @param obj
@ -236,10 +237,8 @@ export function GetBox(obj: Object3D, updateMatrix?: boolean): Box3
{
if (!geo.boundingBox)
geo.computeBoundingBox();
let geoBox = geo.boundingBox.clone().applyMatrix4(o.matrixWorld);
if (geoBox.max.z > 1e5)
console.log();
box.union(geoBox);
tempBox.copy(geo.boundingBox).applyMatrix4(o.matrixWorld);
box.union(tempBox);
}
});
return box;

Loading…
Cancel
Save