Przeglądaj źródła

Update collada loader to use the collada ID as the threejs ID to fix a bug in loading the animations

Steven Carr 12 lat temu
rodzic
commit
61e01f5238
1 zmienionych plików z 2 dodań i 1 usunięć
  1. 2 1
      examples/js/loaders/ColladaLoader.js

+ 2 - 1
examples/js/loaders/ColladaLoader.js

@@ -287,7 +287,7 @@ THREE.ColladaLoader = function () {
 
 	function recurseHierarchy( node ) {
 
-		var n = daeScene.getChildById( node.name, true ),
+		var n = daeScene.getChildById( node.id, true ),
 			newData = null;
 
 		if ( n && n.keys ) {
@@ -1114,6 +1114,7 @@ THREE.ColladaLoader = function () {
 		}
 
 		obj.name = node.name || node.id || "";
+		obj.id = node.id || "";
 		obj.layer = node.layer || "";
 		obj.matrix = node.matrix;
 		obj.matrix.decompose( obj.position, obj.quaternion, obj.scale );