Browse Source

Merge pull request #14524 from looeee/fbxloader_single_group

FBXLoader: don't return top level double nested group
Mr.doob 7 years ago
parent
commit
d2e9f5f4f0
1 changed files with 8 additions and 0 deletions
  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;
 
 	}