tsparticles
Version:
Easily create highly customizable particle animations and use them as animated backgrounds for your website. Ready to use components available also for React, Vue.js (2.x and 3.x), Angular, Svelte, jQuery, Preact, Riot.js, Inferno.
16 lines (15 loc) • 607 B
TypeScript
import type { ICoordinates, IParticle, IShapeDrawer } from "../../Core/Interfaces";
export interface ISideCount {
numerator: number;
denominator: number;
}
export interface ISide {
count: ISideCount;
length: number;
}
export declare abstract class PolygonDrawerBase implements IShapeDrawer {
getSidesCount(particle: IParticle): number;
draw(context: CanvasRenderingContext2D, particle: IParticle, radius: number): void;
abstract getSidesData(particle: IParticle, radius: number): ISide;
abstract getCenter(particle: IParticle, radius: number): ICoordinates;
}