浏览代码

Merge pull request #14067 from takahirox/GLTFLoaderMultiMaterialMorphAnimation

GLTFLoader: Fix loadAnimation for Morph + MultiMaterial
Mr.doob 7 年之前
父节点
当前提交
2ec2aa0842
共有 1 个文件被更改,包括 3 次插入4 次删除
  1. 3 4
      examples/js/loaders/GLTFLoader.js

+ 3 - 4
examples/js/loaders/GLTFLoader.js

@@ -2841,14 +2841,13 @@ THREE.GLTFLoader = ( function () {
 
 
 						if ( PATH_PROPERTIES[ target.path ] === PATH_PROPERTIES.weights ) {
 						if ( PATH_PROPERTIES[ target.path ] === PATH_PROPERTIES.weights ) {
 
 
-							// node should be THREE.Group here but
+							// node can be THREE.Group here but
 							// PATH_PROPERTIES.weights(morphTargetInfluences) should be
 							// PATH_PROPERTIES.weights(morphTargetInfluences) should be
-							// the property of a mesh object under node.
-							// So finding targets here.
+							// the property of a mesh object under group.
 
 
 							node.traverse( function ( object ) {
 							node.traverse( function ( object ) {
 
 
-								if ( object.isMesh === true && object.material.morphTargets === true ) {
+								if ( object.isMesh === true && object.morphTargetInfluences ) {
 
 
 									targetNames.push( object.name ? object.name : object.uuid );
 									targetNames.push( object.name ? object.name : object.uuid );