添加关照、全局等高线、修改图层问题
This commit is contained in:
36
dist/electron/static/sdk/three/jsm/loaders/TIFFLoader.js
vendored
Normal file
36
dist/electron/static/sdk/three/jsm/loaders/TIFFLoader.js
vendored
Normal file
@ -0,0 +1,36 @@
|
||||
import {
|
||||
DataTextureLoader,
|
||||
LinearFilter,
|
||||
LinearMipmapLinearFilter
|
||||
} from 'three';
|
||||
|
||||
import UTIF from '../libs/utif.module.js';
|
||||
|
||||
class TIFFLoader extends DataTextureLoader {
|
||||
|
||||
constructor( manager ) {
|
||||
|
||||
super( manager );
|
||||
|
||||
}
|
||||
|
||||
parse( buffer ) {
|
||||
|
||||
const ifds = UTIF.decode( buffer );
|
||||
UTIF.decodeImage( buffer, ifds[ 0 ] );
|
||||
const rgba = UTIF.toRGBA8( ifds[ 0 ] );
|
||||
|
||||
return {
|
||||
width: ifds[ 0 ].width,
|
||||
height: ifds[ 0 ].height,
|
||||
data: rgba,
|
||||
flipY: true,
|
||||
magFilter: LinearFilter,
|
||||
minFilter: LinearMipmapLinearFilter
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export { TIFFLoader };
|
Reference in New Issue
Block a user