UNPKG

@tolokoban/tgd

Version:

ToloGameDev library for WebGL2

15 lines 812 B
/** * Try to load an image and return `null` in case of failure. * @param url URL of the image to load. */ export declare function tgdLoadImage(url: string): Promise<HTMLImageElement | null>; export declare function tgdLoadImageFromArrayBuffer(buffer: ArrayBuffer): Promise<HTMLImageElement | null>; export declare function tgdLoadImages(urls: string[]): Promise<Array<HTMLImageElement | null>>; /** * The image will have the size specified in the SVG tag. * @param svg XML content of a SVG image. */ export declare function tgdLoadCanvasFromSvg(svg: string): Promise<HTMLCanvasElement>; export declare function tgdLoadCanvasFromElement(element: Element): Promise<HTMLCanvasElement>; export declare function tgdLoadCanvas(url: string): Promise<HTMLCanvasElement | null>; //# sourceMappingURL=image.d.ts.map