浏览代码

don't return top level double nested group

Lewy Blue 7 年之前
父节点
当前提交
730aeb6670
共有 1 个文件被更改,包括 8 次插入0 次删除
  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;
 
 	}