Browse Source

fix MorphBlendMesh setAnimationFps()

bugfix for: When setAnimationFPS then animation.duration is NaN.
ostolop 10 years ago
parent
commit
0ffea7b8f2
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/extras/objects/MorphBlendMesh.js

+ 3 - 3
src/extras/objects/MorphBlendMesh.js

@@ -33,8 +33,8 @@ THREE.MorphBlendMesh.prototype.createAnimation = function ( name, start, end, fp
 
 	var animation = {
 
-		startFrame: start,
-		endFrame: end,
+		start: start,
+		end: end,
 
 		length: end - start + 1,
 
@@ -280,7 +280,7 @@ THREE.MorphBlendMesh.prototype.update = function ( delta ) {
 
 		}
 
-		var keyframe = animation.startFrame + THREE.Math.clamp( Math.floor( animation.time / frameTime ), 0, animation.length - 1 );
+		var keyframe = animation.start + THREE.Math.clamp( Math.floor( animation.time / frameTime ), 0, animation.length - 1 );
 		var weight = animation.weight;
 
 		if ( keyframe !== animation.currentFrame ) {