Browse Source

GLTFLoader: Fix typo in skin/joint traversal.

Don McCurdy 7 years ago
parent
commit
08f1630ed5
1 changed files with 4 additions and 2 deletions
  1. 4 2
      examples/js/loaders/GLTFLoader.js

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

@@ -2234,9 +2234,11 @@ THREE.GLTFLoader = ( function () {
 		// Object3D. Use the skins' joint references to mark bones.
 		for ( var skinIndex in skins ) {
 
-			for ( var jointIndex in skins[ skinIndex ].joints ) {
+			var joints = skins[ skinIndex ].joints;
 
-				nodes[ jointIndex ].isBone = true;
+			for ( var i = 0; i < joints.length; ++ i ) {
+
+				nodes[ joints[ i ] ].isBone = true;
 
 			}