mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-26 07:24:57 +01:00
add comment
This commit is contained in:
parent
c30bd0440e
commit
bacca4099c
@ -20,6 +20,8 @@ export function createScene(canvas, props, state) {
|
|||||||
} else if (props.geometry.isBufferGeometry) {
|
} else if (props.geometry.isBufferGeometry) {
|
||||||
geometry = new THREE.Geometry().fromBufferGeometry(props.geometry);
|
geometry = new THREE.Geometry().fromBufferGeometry(props.geometry);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// center geometry
|
||||||
geometry.computeBoundingBox();
|
geometry.computeBoundingBox();
|
||||||
const centerX = (geometry.boundingBox.max.x + geometry.boundingBox.min.x) / 2;
|
const centerX = (geometry.boundingBox.max.x + geometry.boundingBox.min.x) / 2;
|
||||||
const centerY = (geometry.boundingBox.max.y + geometry.boundingBox.min.y) / 2;
|
const centerY = (geometry.boundingBox.max.y + geometry.boundingBox.min.y) / 2;
|
||||||
|
Loading…
Reference in New Issue
Block a user