LogoPixi’VN
indexFunctions

Function: getTexture()

> getTexture(textureAlias?): Promise<Texture<TextureSource<any>> | undefined>

Defined in: src/canvas/functions/texture-utility.ts:12

Get a texture from a url.

Parameters

textureAlias?

string

is the url of the file.

Returns

Promise<Texture<TextureSource<any>> | undefined>

the texture of the image or video, or undefined when textureAlias is the "EMPTY" sentinel value.

Throws

when the alias is missing, the asset is not found in the cache/network, or the loaded resource is not a Texture.