Procházet zdrojové kódy

don't return top level double nested group

Lewy Blue před 7 roky
rodič
revize
730aeb6670
1 změnil soubory, kde provedl 8 přidání a 0 odebrání
  1. 8 0
      examples/js/loaders/FBXLoader.js

+ 8 - 0
examples/js/loaders/FBXLoader.js

@@ -1651,6 +1651,14 @@
 
 		setupMorphMaterials( sceneGraph );
 
+		// if all the models where already combined in a single group, just return that
+		if ( sceneGraph.children.length === 1 && sceneGraph.children[ 0 ].isGroup ) {
+
+			sceneGraph.children[ 0 ].animations = sceneGraph.animations;
+			return sceneGraph.children[ 0 ];
+
+		}
+
 		return sceneGraph;
 
 	}