Pārlūkot izejas kodu

merge fbxloader_single_group branch

Lewy Blue 7 gadi atpakaļ
vecāks
revīzija
d3feb498fc
1 mainītis faili ar 8 papildinājumiem un 0 dzēšanām
  1. 8 0
      examples/js/loaders/FBXLoader.js

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

@@ -1641,6 +1641,14 @@ THREE.FBXLoader = ( function () {
 
 
 			this.setupMorphMaterials( sceneGraph );
 			this.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;
 			return sceneGraph;
 
 
 		},
 		},