Buckets:
ktongue/docker_container / simsite /frontend /node_modules /three /examples /jsm /loaders /TIFFLoader.js
| 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 }; | |
Xet Storage Details
- Size:
- 572 Bytes
- Xet hash:
- ec31514a5d8a6b37d7e3f3216ee8f986ecee16ffbf72c7a7377c0435151218e9
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.