UNPKG

844 BTypeScriptView Raw
1import type { IParticle, IShapeDrawer } from "../../Core/Interfaces";
2import type { Container } from "../../Core/Container";
3import type { IImage } from "./Utils";
4import { Particle } from "../../Core/Particle";
5interface ContainerImage {
6 id: string;
7 images: IImage[];
8}
9/**
10 * @category Shape Drawers
11 */
12export declare class ImageDrawer implements IShapeDrawer {
13 #private;
14 constructor();
15 getSidesCount(): number;
16 getImages(container: Container): ContainerImage;
17 addImage(container: Container, image: IImage): void;
18 init(container: Container): Promise<void>;
19 destroy(): void;
20 private loadImagesFromParticlesOptions;
21 private loadImageShape;
22 draw(context: CanvasRenderingContext2D, particle: IParticle, radius: number, opacity: number): void;
23 loadShape(particle: Particle): void;
24}
25export {};