# 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/11c55b5d212c6c7eaffb12776b3f83f4d38e1ede/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`.
