Skip to content

loadTexture() ​

ts
function loadTexture(
  src: string,
  params?: BaseTextureParams,
): Promise<ImageTextureParams<ImageBitmap>>;

Loads an image from a URL and returns a Promise resolving to ImageTextureParams.

Parameters ​

src ​

string

URL of the image.

params? ​

BaseTextureParams

Additional texture parameters.

Returns ​

Promise<ImageTextureParams<ImageBitmap>>

Released under the MIT License.