# Function: getTexture() (/jsdoc/pixi-vn/index/functions/getTexture)



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

Defined in: [src/canvas/functions/texture-utility.ts:12](https://github.com/DRincs-Productions/pixi-vn/blob/998c1a75c5978f24c0dc137af5f42b90b2803967/src/canvas/functions/texture-utility.ts#L12)

Get a texture from a url.

Parameters [#parameters]

textureAlias? [#texturealias]

`string`

is the url of the file.

Returns [#returns]

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

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

Throws [#throws]

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