提交 8fcc7b8d 编写于 作者: M Mr.doob

Updated jsm files.

上级 e1f9510d
......@@ -12,6 +12,8 @@ import {
DataTextureLoader,
FloatType,
HalfFloatType,
LinearEncoding,
LinearFilter,
RGBAFormat,
RGBFormat
} from "../../../build/three.module.js";
......@@ -93,13 +95,6 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
constructor: EXRLoader,
setDataType: function ( value ) {
this.type = value;
return this;
},
parse: function ( buffer ) {
const USHORT_RANGE = ( 1 << 16 );
......@@ -1239,6 +1234,47 @@ EXRLoader.prototype = Object.assign( Object.create( DataTextureLoader.prototype
type: this.type
};
},
setDataType: function ( value ) {
this.type = value;
return this;
},
load: function ( url, onLoad, onProgress, onError ) {
function onLoadCallback( texture, texData ) {
switch ( texture.type ) {
case FloatType:
texture.encoding = LinearEncoding;
texture.minFilter = LinearFilter;
texture.magFilter = LinearFilter;
texture.generateMipmaps = false;
texture.flipY = false;
break;
case HalfFloatType:
texture.encoding = LinearEncoding;
texture.minFilter = LinearFilter;
texture.magFilter = LinearFilter;
texture.generateMipmaps = false;
texture.flipY = false;
break;
}
if ( onLoad ) onLoad( texture, texData );
}
return DataTextureLoader.prototype.load.call( this, url, onLoadCallback, onProgress, onError );
}
} );
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册