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 container, then you need to use the function ().
Parameters
alias
string
is the unique alias of the container. You can use this alias to refer to this container
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 container.
Returns
This function returns an ImageContainer that you can use to manipulate the component.
Example
let bunny = addImageContainer("bunny", ["https://pixijs.com/assets/bunny-body.png", "https://pixijs.com/assets/bunny-eyes.png"])
await bunny.load()