浏览代码

Fix for exception with 1 keyframe animations

Animations with only one key throw exception because next frame is not available.
michax 9 年之前
父节点
当前提交
803a5f37ef
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      examples/js/loaders/collada/KeyFrameAnimation.js

+ 1 - 1
examples/js/loaders/collada/KeyFrameAnimation.js

@@ -84,7 +84,7 @@ THREE.KeyFrameAnimation.prototype = {
 
 				var keys = this.data.hierarchy[ h ].keys;
 
-				if ( keys.length ) {
+				if ( keys.length > 1 ) {
 
 					node.animationCache.prevKey = keys[ 0 ];
 					node.animationCache.nextKey = keys[ 1 ];