UNPKG

@drincs/pixi-vn

Version:

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

26 lines (23 loc) 959 B
import { Texture } from 'pixi.js'; import CanvasBase from '../classes/canvas/CanvasBase.js'; import ICanvasBaseMemory from '../interface/canvas/ICanvasBaseMemory.js'; import ITextureMemory from '../interface/canvas/ITextureMemory.js'; /** * Get the memory object of the PixiJS texture * @param texture PixiJS Texture object * @returns Memory object of the texture */ declare function getTextureMemory(texture: Texture): ITextureMemory; /** * Export a Canvas element to a memory object * @param element Canvas element * @returns Memory object of the canvas */ declare function exportCanvasElement<T extends CanvasBase<any>>(element: T): ICanvasBaseMemory; /** * Import a Canvas element from a memory object * @param memory Memory object of the canvas * @returns Canvas element */ declare function importCanvasElement<T extends CanvasBase<any>>(memory: ICanvasBaseMemory): T; export { exportCanvasElement, getTextureMemory, importCanvasElement };