Explorar el Código

Use animation.name for AnimationClip

Takahiro hace 8 años
padre
commit
e0bf8b370e
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      examples/js/loaders/GLTFLoader.js

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

@@ -1822,7 +1822,9 @@ THREE.GLTFLoader = ( function () {
 
 				}
 
-				return new THREE.AnimationClip( "animation_" + animationId, undefined, tracks );
+				var name = animation.name !== undefined ? animation.name : "animation_" + animationId;
+
+				return new THREE.AnimationClip( name, undefined, tracks );
 
 			} );