API

Variable BasisToolsConst

BasisTools: {
    GetInternalFormatFromBasisFormat: (
        basisFormat: number,
        engine: AbstractEngine,
    ) => number;
    JSModuleURL: string;
    LoadTextureFromTranscodeResult: (
        texture: InternalTexture,
        transcodeResult: TranscodeResult,
    ) => void;
    TranscodeAsync: (
        data: ArrayBuffer | ArrayBufferView<ArrayBufferLike>,
        config: BasisTranscodeConfiguration,
    ) => Promise<TranscodeResult>;
    WasmModuleURL: string;
} = ...

Type Declaration

  • GetInternalFormatFromBasisFormat: (basisFormat: number, engine: AbstractEngine) => number

    Get the internal format to be passed to texImage2D corresponding to the .basis format value

    format chosen from GetSupportedTranscodeFormat

    internal format corresponding to the Basis format

  • JSModuleURL: string

    URL to use when loading the basis transcoder

  • LoadTextureFromTranscodeResult: (texture: InternalTexture, transcodeResult: TranscodeResult) => void

    Loads a texture from the transcode result

    texture load to

    the result of transcoding the basis file to load from

  • TranscodeAsync: (
        data: ArrayBuffer | ArrayBufferView<ArrayBufferLike>,
        config: BasisTranscodeConfiguration,
    ) => Promise<TranscodeResult>

    Transcodes a loaded image file to compressed pixel data

    image data to transcode

    configuration options for the transcoding

    a promise resulting in the transcoded image

  • WasmModuleURL: string

    URL to use when loading the wasm module for the transcoder