Parcourir la source

ColladaLoader2: Fix buildVisualScene

Mugen87 il y a 8 ans
Parent
commit
aa292d1655
1 fichiers modifiés avec 11 ajouts et 1 suppressions
  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 ) );
+
+				}
 
 			}