mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-12-23 11:33:49 +01:00
parent
16d2468ced
commit
87f7f2f906
@ -11,9 +11,9 @@ export default class {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
setGeometry(geometry, matrix) {
|
setGeometry(geometry, matrix) {
|
||||||
if (geometry.type === 'BufferGeometry') {
|
if (geometry.isBufferGeometry) {
|
||||||
geometry = new THREE.Geometry().fromBufferGeometry(geometry);
|
geometry = new THREE.Geometry().fromBufferGeometry(geometry);
|
||||||
} else if (geometry.type === 'Geometry') {
|
} else if (geometry.isGeometry) {
|
||||||
geometry = geometry.clone();
|
geometry = geometry.clone();
|
||||||
} else {
|
} else {
|
||||||
throw new Error('Geometry is not an instance of BufferGeometry or Geometry');
|
throw new Error('Geometry is not an instance of BufferGeometry or Geometry');
|
||||||
|
Loading…
Reference in New Issue
Block a user