ktx2-encoder / IEncodeOptions
compressionLevel:
number
The compression_level parameter controls the encoder perf vs. file size tradeoff for ETC1S files.
enableDebug:
boolean
enable debug output, default is false
generateMipmap:
boolean
If true mipmaps will be generated from the source images
optional
imageDecoder: (buffer
) =>Promise
<{data
:Uint8Array
;height
:number
;width
:number
; }>
Decode compressed image buffer to RGBA imageData.(Required in Node.js)
Uint8Array
Promise
<{ data
: Uint8Array
; height
: number
; width
: number
; }>
isKTX2File:
boolean
Create .KTX2 files instead of .basis files. By default this is FALSE.
isNormalMap:
boolean
setNormalMapMode is the same as the basisu.exe "-normal_map" option. It tunes several codec parameters so compression works better on normal maps.
isSetKTX2SRGBTransferFunc:
boolean
Input source is sRGB. This should very probably match the "perceptual" setting.
isUASTC:
boolean
is UASTC texture, default is true
isYFlip:
boolean
if true the source images will be Y flipped before compression, default is false
optional
jsUrl:string
js url
kvData:
Record
<string
,string
|Uint8Array
>
kv data
needSupercompression:
boolean
Use UASTC Zstandard supercompression. Defaults to disabled or KTX2_SS_NONE
qualityLevel:
number
Sets the ETC1S encoder's quality level, which controls the file size vs. quality tradeoff.
type:
SourceType
type
optional
wasmUrl:string
wasm url