Explorar o código

Merge pull request #14524 from looeee/fbxloader_single_group

FBXLoader: don't return top level double nested group
Mr.doob %!s(int64=7) %!d(string=hai) anos
pai
achega
d2e9f5f4f0
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      examples/js/loaders/FBXLoader.js

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

@@ -1636,6 +1636,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;
 
 	}