提交 48883da1 编写于 作者: M Mr.doob

Updated builds.

上级 1336d04d
......@@ -35564,14 +35564,14 @@
this.type = 'Audio';
this.context = listener.context;
this.source = this.context.createBufferSource();
this.source.onended = this.onEnded.bind( this );
this.gain = this.context.createGain();
this.gain.connect( listener.getInput() );
this.autoplay = false;
this.buffer = null;
this.loop = false;
this.startTime = 0;
this.playbackRate = 1;
this.isPlaying = false;
......@@ -35605,7 +35605,7 @@
setBuffer: function ( audioBuffer ) {
this.source.buffer = audioBuffer;
this.buffer = audioBuffer;
this.sourceType = 'buffer';
if ( this.autoplay ) this.play();
......@@ -35632,11 +35632,11 @@
var source = this.context.createBufferSource();
source.buffer = this.source.buffer;
source.loop = this.source.loop;
source.onended = this.source.onended;
source.buffer = this.buffer;
source.loop = this.loop;
source.onended = this.onEnded.bind( this );
source.playbackRate.setValueAtTime( this.playbackRate, this.startTime );
source.start( 0, this.startTime );
source.playbackRate.value = this.playbackRate;
this.isPlaying = true;
......@@ -35779,7 +35779,7 @@
if ( this.isPlaying === true ) {
this.source.playbackRate.value = this.playbackRate;
this.source.playbackRate.setValueAtTime( this.playbackRate, this.context.currentTime );
}
......@@ -35808,7 +35808,7 @@
}
return this.source.loop;
return this.loop;
},
......@@ -35821,7 +35821,15 @@
}
this.source.loop = value;
this.loop = value;
if ( this.isPlaying === true ) {
this.source.loop = this.loop;
}
return this;
},
......
此差异已折叠。
......@@ -35558,14 +35558,14 @@ function Audio( listener ) {
this.type = 'Audio';
this.context = listener.context;
this.source = this.context.createBufferSource();
this.source.onended = this.onEnded.bind( this );
this.gain = this.context.createGain();
this.gain.connect( listener.getInput() );
this.autoplay = false;
this.buffer = null;
this.loop = false;
this.startTime = 0;
this.playbackRate = 1;
this.isPlaying = false;
......@@ -35599,7 +35599,7 @@ Audio.prototype = Object.assign( Object.create( Object3D.prototype ), {
setBuffer: function ( audioBuffer ) {
this.source.buffer = audioBuffer;
this.buffer = audioBuffer;
this.sourceType = 'buffer';
if ( this.autoplay ) this.play();
......@@ -35626,11 +35626,11 @@ Audio.prototype = Object.assign( Object.create( Object3D.prototype ), {
var source = this.context.createBufferSource();
source.buffer = this.source.buffer;
source.loop = this.source.loop;
source.onended = this.source.onended;
source.buffer = this.buffer;
source.loop = this.loop;
source.onended = this.onEnded.bind( this );
source.playbackRate.setValueAtTime( this.playbackRate, this.startTime );
source.start( 0, this.startTime );
source.playbackRate.value = this.playbackRate;
this.isPlaying = true;
......@@ -35773,7 +35773,7 @@ Audio.prototype = Object.assign( Object.create( Object3D.prototype ), {
if ( this.isPlaying === true ) {
this.source.playbackRate.value = this.playbackRate;
this.source.playbackRate.setValueAtTime( this.playbackRate, this.context.currentTime );
}
......@@ -35802,7 +35802,7 @@ Audio.prototype = Object.assign( Object.create( Object3D.prototype ), {
}
return this.source.loop;
return this.loop;
},
......@@ -35815,7 +35815,15 @@ Audio.prototype = Object.assign( Object.create( Object3D.prototype ), {
}
this.source.loop = value;
this.loop = value;
if ( this.isPlaying === true ) {
this.source.loop = this.loop;
}
return this;
},
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册