Explorar o código

Use uuid for animation target if node.name is not defined

Takahiro %!s(int64=8) %!d(string=hai) anos
pai
achega
e23b03b483
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      examples/js/loaders/GLTFLoader.js

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

@@ -1397,12 +1397,14 @@ THREE.GLTFLoader = ( function () {
 
 						if ( node ) {
 
+							var targetName = node.name ? node.name : node.uuid;
+
 							var interp = {
 								times: inputAccessor.array,
 								values: outputAccessor.array,
 								target: node,
 								type: INTERPOLATION[ sampler.interpolation ],
-								name: node.name + '.' + PATH_PROPERTIES[ target.path ]
+								name: targetName + '.' + PATH_PROPERTIES[ target.path ]
 							};
 
 							interps.push( interp );