Bläddra i källkod

The audio should not be replayed automatically.

When the duration between audio and mesh animation is synchronized, the audio should not be replayed automatically,, but should wait for a uniform cycle of the animation.
Pan Xinmiao 6 år sedan
förälder
incheckning
bdbcdd688f
1 ändrade filer med 2 tillägg och 0 borttagningar
  1. 2 0
      examples/js/animation/MMDAnimationHelper.js

+ 2 - 0
examples/js/animation/MMDAnimationHelper.js

@@ -945,6 +945,8 @@ THREE.MMDAnimationHelper = ( function () {
 			}
 			}
 
 
 			if ( this.currentTime < this.delayTime ) return false;
 			if ( this.currentTime < this.delayTime ) return false;
+			
+			if ((this.currentTime - this.delayTime) > this.audioDuration) return false;
 
 
 			this.audio.startTime = this.currentTime - this.delayTime;
 			this.audio.startTime = this.currentTime - this.delayTime;