提交 171dfa42 编写于 作者: M Mr.doob

JSONLoader clean up.

上级 3f93290c
......@@ -497,20 +497,30 @@ THREE.JSONLoader.prototype = {
// parse old style Bone/Hierarchy animations
var animations = [];
if ( json.animation !== undefined ) {
animations.push( json.animation );
}
if ( json.animations !== undefined ) {
if ( json.animations.length ) {
animations = animations.concat( json.animations );
} else {
animations.push( json.animations );
}
}
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 );
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册