@drincs/pixi-vn
Version:
Pixi'VN is a npm package that provides various features for creating visual novels.
50 lines (47 loc) • 2.61 kB
text/typescript
import { ImageContainerOptions } from '../../interface/canvas/canvas-options.cjs';
import ImageSprite from '../../classes/canvas/ImageSprite.cjs';
import ImageContainer from '../../classes/canvas/ImageContainer.cjs';
import 'pixi.js';
import '../../classes/canvas/AdditionalPositions.cjs';
import '../../classes/canvas/AnchorExtension.cjs';
import '../../types/ContainerChild.cjs';
import '../../classes/canvas/CanvasBaseItem.cjs';
import '../../interface/canvas/memory/CanvasBaseItemMemory.cjs';
import '../../classes/canvas/Sprite.cjs';
import '../../types/CanvasEventNamesType.cjs';
import '../../classes/CanvasEvent.cjs';
import '../../types/EventIdType.cjs';
import '../../interface/canvas/memory/SpriteMemory.cjs';
import '../../interface/canvas/TextureMemory.cjs';
import '../../interface/canvas/memory/ImageSpriteMemory.cjs';
import '../../classes/canvas/Container.cjs';
import '../../interface/canvas/memory/ContainerMemory.cjs';
import '../../interface/canvas/memory/ImageContainerMemory.cjs';
/**
* Add a list of images in the container, after that, the images are added to the canvas.
* Is the same that {@link showImageContainer}, but the image is not shown.
* If you want to show the image, then you need to use the function {@link ImageSprite.load()}.
* @param alias is the unique alias of the image. You can use this alias to refer to this image
* @param imageUrls is the url of the image. If you don't provide the url, then the alias is used as the url.
* @param options The options of the image.
* @returns the container of the image.
* @example
* ```typescript
* let bunny = addImageContainer("bunny", ["https://pixijs.com/assets/bunny-body.png", "https://pixijs.com/assets/bunny-eyes.png"])
* await bunny.load()
* ```
*/
declare function addImageCointainer(alias: string, imageUrls: string[], options?: ImageContainerOptions<ImageSprite>): ImageContainer;
/**
* Add a list of images in the container, after that, the images are added and shown in the canvas.
* @param alias The unique alias of the image. You can use this alias to refer to this image
* @param imageUrls The url of the image.
* @param options The options of the image.
* @returns A promise that is resolved when the image is loaded.
* @example
* ```typescript
* let bunny = showImageContainer("bunny", ["https://pixijs.com/assets/bunny-body.png", "https://pixijs.com/assets/bunny-eyes.png"])
* ```
*/
declare function showImageContainer(alias: string, imageUrls: string[], options?: ImageContainerOptions<ImageSprite>): Promise<ImageContainer>;
export { addImageCointainer, showImageContainer };