API

Function createTexture2DArrayFromUrls

  • Create a 2D texture array and populate every layer from a list of image URLs — one URL per layer, in order. All images must decode to the same dimensions (the array's width/height are taken from the first). This is the highest-level, most ergonomic entry point.

    Parameters

    • engine: EngineContext

      Engine context.

    • urls: readonly [string, string]

      One image URL per layer (urls.length >= 1).

    • options: TextureArrayFromUrlsOptions = {}

      Sampler / format overrides, plus the per-layer invertY / premultiplyAlpha upload flags applied to every layer.

    Returns Promise<Texture2DArray>

    A promise resolving to the populated Texture2DArray.