浏览代码

Audio: Renamed startTime to delay for clarity.

Mr.doob 5 年之前
父节点
当前提交
cb7ec17b96
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/audio/Audio.js

+ 3 - 3
src/audio/Audio.js

@@ -92,9 +92,9 @@ Audio.prototype = Object.assign( Object.create( Object3D.prototype ), {
 
 	},
 
-	play: function ( startTime ) {
+	play: function ( delay ) {
 
-		if ( startTime === undefined ) startTime = 0;
+		if ( delay === undefined ) delay = 0;
 
 		if ( this.isPlaying === true ) {
 
@@ -110,7 +110,7 @@ Audio.prototype = Object.assign( Object.create( Object3D.prototype ), {
 
 		}
 
-		this._startedAt = this.context.currentTime + startTime;
+		this._startedAt = this.context.currentTime + delay;
 
 		var source = this.context.createBufferSource();
 		source.buffer = this.buffer;