2
0
Эх сурвалжийг харах

Re-added special handling of SkinnedMesh.

Ian Kerr 11 жил өмнө
parent
commit
c18a8b9a8a

+ 13 - 1
src/extras/animation/AnimationHandler.js

@@ -149,7 +149,19 @@ THREE.AnimationHandler = {
 
 		var hierarchy = [];
 
-		parseRecurseHierarchy( root, hierarchy );
+		if ( root instanceof THREE.SkinnedMesh ) {
+
+			for ( var b = 0; b < root.skeleton.bones.length; b++ ) {
+
+				hierarchy.push( root.skeleton.bones[ b ] );
+
+			}
+
+		} else {
+
+			parseRecurseHierarchy( root, hierarchy );
+
+		}
 
 		return hierarchy;