提交 0083d64b 编写于 作者: M Michael Herzog 提交者: Mr.doob

Audio: Moved deprecated method "load" to Three.Legacy

上级 195ba9cf
......@@ -680,6 +680,30 @@ Object.defineProperties( THREE.WebGLRenderTarget.prototype, {
//
Object.defineProperties( THREE.Audio.prototype, {
load: {
value: function ( file ) {
console.warn( 'THREE.Audio: .load has been deprecated. Please use THREE.AudioLoader.' );
var scope = this;
var audioLoader = new THREE.AudioLoader();
audioLoader.load( file, function ( buffer ) {
scope.setBuffer( buffer );
} );
return this;
}
}
} );
//
THREE.GeometryUtils = {
merge: function ( geometry1, geometry2, materialIndexOffset ) {
......
......@@ -37,23 +37,6 @@ THREE.Audio.prototype.getOutput = function () {
};
THREE.Audio.prototype.load = function ( file ) {
console.warn( 'THREE.Audio: .load has been deprecated. Please use THREE.AudioLoader.' );
var scope = this;
var audioLoader = new THREE.AudioLoader();
audioLoader.load( file, function ( buffer ) {
scope.setBuffer( buffer );
} );
return this;
};
THREE.Audio.prototype.setNodeSource = function ( audioNode ) {
this.hasPlaybackControl = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册