From d3feb498fcd79c2757ecd74f626a8523771e18ed Mon Sep 17 00:00:00 2001 From: Lewy Blue Date: Thu, 26 Jul 2018 13:11:20 +0100 Subject: [PATCH] merge fbxloader_single_group branch --- examples/js/loaders/FBXLoader.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/examples/js/loaders/FBXLoader.js b/examples/js/loaders/FBXLoader.js index 2f3e088f26..abd7b4013b 100644 --- a/examples/js/loaders/FBXLoader.js +++ b/examples/js/loaders/FBXLoader.js @@ -1641,6 +1641,14 @@ THREE.FBXLoader = ( function () { 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; }, -- GitLab