Documentation
    Preparing search index...

    Function createTextureDecoder

    • Builds the fetch-free half of the texture tier: encoded bytes in, a checked, flipped, tagged TextureAsset out (§77, §96).

      This is createTextureLoader's whole decode path as a standalone function, for callers that already hold the encoded bytes — the §78 glTF loader's embedded and buffer-view images are the first (gltf.ts), and an application streaming images from somewhere fetch cannot reach is the same shape. Every rule is identical because it is literally the same code: the §96 pre-/post-decode bounds, the §85 dimension checks, and the §7a row flip.

      Parameters

      Returns (encoded: ArrayBuffer, url: string) => Promise<TextureAsset>

      An async (encoded, url) => TextureAsset decoder; url labels errors only.

      FourError INVALID_APPLICATION_STATE for a non-positive limit.