indexFunctions
Function: addImageCointainer()
> addImageCointainer(alias, imageUrls, options?): ImageContainer
Defined in: src/canvas/functions/image-container-utility.ts:19
Add a list of images in the container, after that, the images are added to the canvas. Is the same that showImageContainer, but the image is not shown. If you want to show the image, then you need to use the function ().
Parameters
alias
string
is the unique alias of the image. You can use this alias to refer to this image
imageUrls
string[]
is the url of the image. If you don't provide the url, then the alias is used as the url.
options?
ImageContainerOptions<ImageSprite<ImageSpriteMemory>>
The options of the image.
Returns
the container of the image.
Example
let bunny = addImageContainer("bunny", ["https://pixijs.com/assets/bunny-body.png", "https://pixijs.com/assets/bunny-eyes.png"])
await bunny.load()