Browse Source

Merge pull request #7589 from michax/Fix-KeyFrameAnimation-Exception

Fix for exception with 1 keyframe animations
Mr.doob 9 years ago
parent
commit
80f1caf9c9
1 changed files with 1 additions and 1 deletions
  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 ];