better error handling

This commit is contained in:
casperlamboo 2016-07-19 14:25:48 +02:00 committed by Simon Voordouw
parent 37fb7e162a
commit 0553076c57

View File

@ -27,8 +27,7 @@ export default class extends EventDispatcher {
} else if (geometry.type.endsWith('Geometry')) { } else if (geometry.type.endsWith('Geometry')) {
geometry = geometry.clone(); geometry = geometry.clone();
} else { } else {
console.warn('Geometry is not an instance of BufferGeometry or Geometry'); throw 'Geometry is not an instance of BufferGeometry or Geometry';
return;
} }
if (matrix instanceof THREE.Matrix4) { if (matrix instanceof THREE.Matrix4) {