UNPKG

@drincs/pixi-vn

Version:

Pixi'VN is a npm package that provides various features for creating visual novels.

50 lines (47 loc) 2.59 kB
import { ImageContainerOptions } from '../../interface/canvas/canvas-options.js'; import ImageSprite from '../../classes/canvas/ImageSprite.js'; import ImageContainer from '../../classes/canvas/ImageContainer.js'; import 'pixi.js'; import '../../classes/canvas/AdditionalPositions.js'; import '../../classes/canvas/AnchorExtension.js'; import '../../types/ContainerChild.js'; import '../../classes/canvas/CanvasBaseItem.js'; import '../../interface/canvas/memory/CanvasBaseItemMemory.js'; import '../../classes/canvas/Sprite.js'; import '../../types/CanvasEventNamesType.js'; import '../../classes/CanvasEvent.js'; import '../../types/EventIdType.js'; import '../../interface/canvas/memory/SpriteMemory.js'; import '../../interface/canvas/TextureMemory.js'; import '../../interface/canvas/memory/ImageSpriteMemory.js'; import '../../classes/canvas/Container.js'; import '../../interface/canvas/memory/ContainerMemory.js'; import '../../interface/canvas/memory/ImageContainerMemory.js'; /** * 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 };