提交 d40328c5 编写于 作者: W WestLangley

setType() -> setDataType()

上级 c4652f7a
......@@ -82,13 +82,21 @@ THREE.EXRLoader = function ( manager ) {
THREE.EXRLoader.prototype = Object.create( THREE.DataTextureLoader.prototype );
THREE.EXRLoader.prototype.setType = function ( value ) {
THREE.EXRLoader.prototype.setDataType = function ( value ) {
this.type = value;
return this;
};
THREE.EXRLoader.prototype.setType = function ( value ) {
console.warn( 'THREE.EXRLoader: .setType() has been renamed to .setDataType().' );
return this.setDataType( value );
};
THREE.EXRLoader.prototype._parser = function ( buffer ) {
const USHORT_RANGE = ( 1 << 16 );
......
......@@ -15,9 +15,9 @@ THREE.HDRCubeTextureLoader.prototype.load = function ( urls, onLoad, onProgress,
if ( ! Array.isArray( urls ) ) {
console.warn( 'THREE.HDRCubeTextureLoader signature has changed. Use .setType() instead.' );
console.warn( 'THREE.HDRCubeTextureLoader signature has changed. Use .setDataType() instead.' );
this.setType( urls );
this.setDataType( urls );
urls = onLoad;
onLoad = onProgress;
......@@ -121,10 +121,18 @@ THREE.HDRCubeTextureLoader.prototype.setPath = function ( value ) {
};
THREE.HDRCubeTextureLoader.prototype.setType = function ( value ) {
THREE.HDRCubeTextureLoader.prototype.setDataType = function ( value ) {
this.type = value;
this.hdrLoader.setType( value );
this.hdrLoader.setDataType( value );
return this;
};
THREE.HDRCubeTextureLoader.prototype.setType = function ( value ) {
console.warn( 'THREE.HDRCubeTextureLoader: .setType() has been renamed to .setDataType().' );
return this.setDataType( value );
};
......@@ -470,13 +470,21 @@ THREE.RGBELoader.prototype._parser = function ( buffer ) {
};
THREE.RGBELoader.prototype.setType = function ( value ) {
THREE.RGBELoader.prototype.setDataType = function ( value ) {
this.type = value;
return this;
};
THREE.RGBELoader.prototype.setType = function ( value ) {
console.warn( 'THREE.RGBELoader: .setType() has been renamed to .setDataType().' );
return this.setDataType( value );
};
THREE.RGBELoader.prototype.load = function ( url, onLoad, onProgress, onError ) {
function onLoadCallback( texture, texData ) {
......
......@@ -19,5 +19,5 @@ export class EXRLoader extends DataTextureLoader {
type: TextureDataType;
_parser(buffer: ArrayBuffer) : EXR;
setType(type: TextureDataType): this;
setDataType(type: TextureDataType): this;
}
......@@ -15,5 +15,5 @@ export class HDRCubeTextureLoader {
load(url: string, onLoad: (texture: CubeTexture) => void, onProgress?: (event: ProgressEvent) => void, onError?: (event: ErrorEvent) => void): void;
setPath(value: string): this;
setType(type: TextureDataType): this;
setDataType(type: TextureDataType): this;
}
......@@ -21,5 +21,5 @@ export class RGBELoader extends DataTextureLoader {
type: TextureDataType;
_parser(buffer: ArrayBuffer): RGBE;
setType(type: TextureDataType): this;
setDataType(type: TextureDataType): this;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册