Documentation
    Preparing search index...

    Interface TextureLoaderOptions

    Construction options for createTextureLoader.

    interface TextureLoaderOptions {
        colorSpace?: TextureColorSpace;
        decode: TexelDecodeLike;
        filter?: TextureFilterMode;
        flipY?: boolean;
        maximumDecodedBytes?: number;
        maximumExpansionRatio?: number;
        maximumWorkingBytes?: number;
        name?: string;
        probe?: TexelProbeLike;
        requireProbe?: boolean;
        wrap?: TextureWrapMode;
    }
    Index
    colorSpace?: TextureColorSpace

    §60a colour-space tag put on the result. Defaults to none, i.e. linear.

    The platform decoder (§77's "canvas and image-bitmap sources").

    §77 filter mode put on the result. Defaults to none, i.e. "linear".

    flipY?: boolean

    Reverse the decoded rows so row 0 is the bottom one (§7a). Defaults to true, because every image codec decodes top-row-first and the engine samples bottom-row-first; pass false for a decoder that already flipped (a browser createImageBitmap with imageOrientation: "flipY").

    maximumDecodedBytes?: number

    §96 decoded-size bound in bytes. Defaults to DEFAULT_MAXIMUM_DECODED_BYTES; Number.POSITIVE_INFINITY disables it.

    maximumExpansionRatio?: number

    §96 decompression bound: decoded bytes per encoded byte. Defaults to DEFAULT_MAXIMUM_EXPANSION_RATIO; Number.POSITIVE_INFINITY disables it.

    maximumWorkingBytes?: number

    Require an enforced decoder linear-memory ceiling, in bytes. The decoder must come directly from a bounded factory with a ceiling no larger than this safe integer (64 KiB–4 GiB). Native callbacks are refused at construction. Omit for legacy platform decoding without a heap cap. Encoded input, returned RGBA bytes and row-flip copies are separate from the decoder heap; this is not a process-wide memory limit.

    name?: string

    Diagnostics label used in error context.loader. Defaults to "texture".

    Optional header reader; see TexelProbeLike and §96, above.

    requireProbe?: boolean

    Require a recognized dimension probe before decoding. Default false.

    §77 wrap mode put on the result. Defaults to none, i.e. "clamp-to-edge".