|
|
|
@ -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;
|
|
|
|
|