Преглед изворни кода

Removed unnecessary and problematic immediate update when calling play on an Animation. Update will accumulate the blend weights for the animation and we don't want it being done twice on any particular frame.

michael пре 11 година
родитељ
комит
55964a7153
1 измењених фајлова са 2 додато и 3 уклоњено
  1. 2 3
      src/extras/animation/Animation.js

+ 2 - 3
src/extras/animation/Animation.js

@@ -32,11 +32,10 @@ THREE.Animation.prototype.play = function ( startTime, weight ) {
 	this.weight = weight !== undefined ? weight: 1;
 	this.weight = weight !== undefined ? weight: 1;
 
 
 	this.isPlaying = true;
 	this.isPlaying = true;
-	this.reset();
-	this.update( 0 );
-
 	this.isPaused = false;
 	this.isPaused = false;
 
 
+	this.reset();
+
 	THREE.AnimationHandler.addToUpdate( this );
 	THREE.AnimationHandler.addToUpdate( this );
 
 
 };
 };