|
@@ -497,20 +497,30 @@ THREE.JSONLoader.prototype = {
|
|
|
|
|
|
// parse old style Bone/Hierarchy animations
|
|
// parse old style Bone/Hierarchy animations
|
|
var animations = [];
|
|
var animations = [];
|
|
|
|
+
|
|
if ( json.animation !== undefined ) {
|
|
if ( json.animation !== undefined ) {
|
|
|
|
+
|
|
animations.push( json.animation );
|
|
animations.push( json.animation );
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
+
|
|
if ( json.animations !== undefined ) {
|
|
if ( json.animations !== undefined ) {
|
|
|
|
+
|
|
if ( json.animations.length ) {
|
|
if ( json.animations.length ) {
|
|
|
|
+
|
|
animations = animations.concat( json.animations );
|
|
animations = animations.concat( json.animations );
|
|
|
|
+
|
|
} else {
|
|
} else {
|
|
|
|
+
|
|
animations.push( json.animations );
|
|
animations.push( json.animations );
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
+
|
|
}
|
|
}
|
|
|
|
|
|
for ( var i = 0; i < animations.length; i ++ ) {
|
|
for ( var i = 0; i < animations.length; i ++ ) {
|
|
|
|
|
|
- var clip = THREE.AnimationClip.parseAnimation( animations[i], geometry.bones );
|
|
|
|
|
|
+ var clip = THREE.AnimationClip.parseAnimation( animations[ i ], geometry.bones );
|
|
if ( clip ) outputAnimations.push( clip );
|
|
if ( clip ) outputAnimations.push( clip );
|
|
|
|
|
|
}
|
|
}
|