API

Interface IDecodedData

Result of the KTX2 decode function

interface IDecodedData {
    errors?: string;
    hasAlpha: boolean;
    height: number;
    isInGammaSpace: boolean;
    layerCount: number;
    mipmaps: IMipmap[];
    transcodedFormat: number;
    transcoderName: string;
    width: number;
}
Index
errors?: string

The errors (if any) encountered during the decoding process

hasAlpha: boolean

Whether the texture has an alpha channel or not

height: number

Height of the texture

isInGammaSpace: boolean

Whether the texture data is in gamma space or not

layerCount: number

Number of array layers of the texture. 1 for a regular (non array) texture

mipmaps: IMipmap[]

List of mipmap levels. The first element is the base level, the last element is the smallest mipmap level (if more than one mipmap level is present) For array textures (layerCount greater than 1), each level contributes layerCount consecutive entries, ordered by layer.

transcodedFormat: number

The format to use when creating the texture at the engine level This corresponds to the engineFormat property of the leaf node of the decision tree

transcoderName: string

The name of the transcoder used to transcode the texture

width: number

Width of the texture