Explorar o código

ColladaLoader2: Fix buildVisualScene

Mugen87 %!s(int64=8) %!d(string=hai) anos
pai
achega
aa292d1655
Modificáronse 1 ficheiros con 11 adicións e 1 borrados
  1. 11 1
      examples/js/loaders/ColladaLoader2.js

+ 11 - 1
examples/js/loaders/ColladaLoader2.js

@@ -3097,7 +3097,17 @@ THREE.ColladaLoader.prototype = {
 
 				var child = children[ i ];
 
-				group.add( getNode( child.id ) );
+				if ( child.id === null ) {
+
+					group.add( buildNode( child ) );
+
+				} else {
+
+					// if there is an ID, let's try to get the finished build (e.g. joints are already build)
+
+					group.add( getNode( child.id ) );
+
+				}
 
 			}