API

Function loadImageToArrayLayer

  • Fetch an image from url, decode it to an ImageBitmap, and upload it into layer of a texture array. This is the optional URL-loading counterpart to uploadImageToArrayLayer(); keeping it a separate function means apps that already hold a decoded source never pull in the fetch/decode path.

    Parameters

    • engine: EngineContext

      Engine context.

    • tex: Texture2DArray

      Target texture array (from createTexture2DArray).

    • layer: number

      Destination layer index in [0, tex.layers).

    • url: string

      Image URL to fetch and decode.

    • opts: ArrayLayerUploadOptions = {}

      Flip-Y / premultiply overrides.

    Returns Promise<void>