UNPKG

627 BTypeScriptView Raw
1import type { ICoordinates, IParticle, IShapeDrawer } from "../../Core/Interfaces";
2export interface ISideCount {
3 numerator: number;
4 denominator: number;
5}
6export interface ISide {
7 count: ISideCount;
8 length: number;
9}
10/**
11 * @category Shape Drawers
12 */
13export declare abstract class PolygonDrawerBase implements IShapeDrawer {
14 getSidesCount(particle: IParticle): number;
15 draw(context: CanvasRenderingContext2D, particle: IParticle, radius: number): void;
16 abstract getSidesData(particle: IParticle, radius: number): ISide;
17 abstract getCenter(particle: IParticle, radius: number): ICoordinates;
18}