UNPKG

809 BTypeScriptView Raw
1/**
2 * @category Interfaces
3 */
4import type { IHsl, IParticle } from "../../Core/Interfaces";
5export interface IImage {
6 source: string;
7 type: string;
8 element?: HTMLImageElement;
9 svgData?: string;
10}
11export interface IParticleImage {
12 source: string;
13 data: IImage;
14 ratio: number;
15 element?: HTMLImageElement;
16 loaded?: boolean;
17 replaceColor: boolean;
18}
19export interface ContainerImage {
20 id: string;
21 images: IImage[];
22}
23export declare type IImageParticle = IParticle & {
24 image: IParticleImage;
25};
26export declare function loadImage(source: string): Promise<IImage | undefined>;
27export declare function downloadSvgImage(source: string): Promise<IImage | undefined>;
28export declare function replaceColorSvg(imageShape: IImage, color: IHsl, opacity: number): string;