API

Interface IKTX2EncoderOptionsExperimental

Options for encoding RGBA8 pixels into a KHR_texture_basisu-compatible KTX2 file.

interface IKTX2EncoderOptions {
    etc1sCompressionLevel?: number;
    etc1sQualityLevel?: number;
    flipY?: boolean;
    generateMipmaps?: boolean;
    uastcQualityLevel?: number;
    usage: KTX2EncoderUsage;
    zstandard?: boolean;
}
Index
etc1sCompressionLevel?: number

Integer ETC1S compression effort for color usage only, from 0 to 6. Defaults to 2.

etc1sQualityLevel?: number

Integer ETC1S quality for color usage only, from 1 to 255. Defaults to 128.

flipY?: boolean

Reverse the input row order in Basis. Defaults to false.

generateMipmaps?: boolean

Generate a full mip pyramid. Defaults to true.

uastcQualityLevel?: number

Integer UASTC quality for data and normal usage only, from 0 to 4. Defaults to 2.

Color uses ETC1S and sRGB; data and normal use linear UASTC.

zstandard?: boolean

Use Zstandard with UASTC. Defaults to true for data and normal. Ignored for color.