ktx2-encoder / IEncodeOptions
Defined in: type.ts:129
compressionLevel:
number
Defined in: type.ts:149
The compression_level parameter controls the encoder perf vs. file size tradeoff for ETC1S files.
enableDebug:
boolean
Defined in: type.ts:133
enable debug output, default is false
generateMipmap:
boolean
Defined in: type.ts:165
If true mipmaps will be generated from the source images
optional
imageDecoder: (buffer
) =>Promise
<{data
:Uint8Array
;height
:number
;width
:number
; }>
Defined in: type.ts:181
Decode compressed image buffer to RGBA imageData.(Required in Node.js)
Uint8Array
Promise
<{ data
: Uint8Array
; height
: number
; width
: number
; }>
isKTX2File:
boolean
Defined in: type.ts:169
Create .KTX2 files instead of .basis files. By default this is FALSE.
isNormalMap:
boolean
Defined in: type.ts:157
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
Defined in: type.ts:161
Input source is sRGB. This should very probably match the "perceptual" setting.
isUASTC:
boolean
Defined in: type.ts:137
is UASTC texture, default is true
isYFlip:
boolean
Defined in: type.ts:141
if true the source images will be Y flipped before compression, default is false
optional
jsUrl:string
Defined in: type.ts:185
js url
kvData:
Record
<string
,string
|Uint8Array
>
Defined in: type.ts:172
kv data
needSupercompression:
boolean
Defined in: type.ts:153
Use UASTC Zstandard supercompression. Defaults to disabled or KTX2_SS_NONE
qualityLevel:
number
Defined in: type.ts:145
Sets the ETC1S encoder's quality level, which controls the file size vs. quality tradeoff.
type:
SourceType
Defined in: type.ts:175
type
optional
wasmUrl:string
Defined in: type.ts:189
wasm url