use stock/tool bounding boxes to optimize animation. stock slices dynamic based on preference
This commit is contained in:
parent
906683d712
commit
3b3d3e5a08
2 changed files with 15 additions and 11 deletions
|
|
@ -67,6 +67,13 @@ const CSG = {
|
|||
triVerts: index.toUint32()
|
||||
});
|
||||
return mesh;
|
||||
},
|
||||
|
||||
toBox3(mesh) {
|
||||
const { min, max } = mesh._boundingBox();
|
||||
const vmin = new THREE.Vector3(min.x, min.y, min.z);
|
||||
const vmax = new THREE.Vector3(max.x, max.y, max.z);
|
||||
return new THREE.Box3(vmin, vmax);
|
||||
}
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue