Skip to content

Latest commit

 

History

History
197 lines (99 loc) · 4.07 KB

IEncodeOptions.md

File metadata and controls

197 lines (99 loc) · 4.07 KB

ktx2-encoder


ktx2-encoder / IEncodeOptions

Interface: IEncodeOptions

Properties

compressionLevel

compressionLevel: number

The compression_level parameter controls the encoder perf vs. file size tradeoff for ETC1S files.

Defined in

type.ts:149


enableDebug

enableDebug: boolean

enable debug output, default is false

Defined in

type.ts:133


generateMipmap

generateMipmap: boolean

If true mipmaps will be generated from the source images

Defined in

type.ts:165


imageDecoder()?

optional imageDecoder: (buffer) => Promise<{ data: Uint8Array; height: number; width: number; }>

Decode compressed image buffer to RGBA imageData.(Required in Node.js)

Parameters

buffer

Uint8Array

Returns

Promise<{ data: Uint8Array; height: number; width: number; }>

Defined in

type.ts:181


isKTX2File

isKTX2File: boolean

Create .KTX2 files instead of .basis files. By default this is FALSE.

Defined in

type.ts:169


isNormalMap

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.

Defined in

type.ts:157


isSetKTX2SRGBTransferFunc

isSetKTX2SRGBTransferFunc: boolean

Input source is sRGB. This should very probably match the "perceptual" setting.

Defined in

type.ts:161


isUASTC

isUASTC: boolean

is UASTC texture, default is true

Defined in

type.ts:137


isYFlip

isYFlip: boolean

if true the source images will be Y flipped before compression, default is false

Defined in

type.ts:141


jsUrl?

optional jsUrl: string

js url

Defined in

type.ts:185


kvData

kvData: Record<string, string | Uint8Array>

kv data

Defined in

type.ts:172


needSupercompression

needSupercompression: boolean

Use UASTC Zstandard supercompression. Defaults to disabled or KTX2_SS_NONE

Defined in

type.ts:153


qualityLevel

qualityLevel: number

Sets the ETC1S encoder's quality level, which controls the file size vs. quality tradeoff.

Defined in

type.ts:145


type

type: SourceType

type

Defined in

type.ts:175


wasmUrl?

optional wasmUrl: string

wasm url

Defined in

type.ts:189