Procházet zdrojové kódy

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

Takahiro před 8 roky
rodič
revize
e23b03b483
1 změnil soubory, kde provedl 3 přidání a 1 odebrání
  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 );