Foundry Virtual Tabletop - API Documentation - Version 14
    Preparing search index...

    Class KTX2Parser

    A KTX2 PIXI loader parser using the official Khronos KTX module.

    Index

    Properties

    detectKTX2: object = ...

    A PIXI asset detection parser for KTX2 textures.

    loadKTX2: object = ...

    A PIXI asset loader parser for KTX2 textures.

    resolveKTX2TextureUrl: object = ...

    A PIXI asset resolver for KTX2 texture URLs.

    WASM_PATH: string = "scripts/ktx2/libktx.wasm"

    The default path to the Khronos libktx WebAssembly module.

    Accessors

    • get initialized(): boolean

      Has the Khronos KTX module been initialized?

      Returns boolean

    • get module(): object | null

      The initialized Khronos KTX module.

      Returns object | null

    Methods

    • Initialize the Khronos KTX module.

      Parameters

      Returns Promise<object>

      The initialized Khronos KTX module.

    • Load a KTX2 URL as a PIXI compressed texture resource.

      Parameters

      Returns Promise<CompressedTextureResource>

      The compressed texture resource.

    • Parse KTX2 data as a PIXI compressed texture resource.

      Parameters

      • data: Uint8Array | ArrayBuffer

        The KTX2 file data.

      • Optionaloptions: KTX2ParserParseOptions = {}

        Parser options.

      Returns Promise<CompressedTextureResource>

      The compressed texture resource.