Explorar el Código

Merge pull request #12606 from cnspaha/patch-5

ColladaLoader: Check if mesh exists before working with it
Mr.doob hace 7 años
padre
commit
fb680a1563
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      examples/js/loaders/ColladaLoader.js

+ 3 - 0
examples/js/loaders/ColladaLoader.js

@@ -1759,6 +1759,9 @@ THREE.ColladaLoader.prototype = {
 			};
 
 			var mesh = getElementsByTagName( xml, 'mesh' )[ 0 ];
+			
+			// the following tags inside geometry are not supported yet (see https://github.com/mrdoob/three.js/pull/12606): convex_mesh, spline, brep
+			if ( mesh === undefined ) return;
 
 			for ( var i = 0; i < mesh.childNodes.length; i ++ ) {