UNPKG

1.79 kBTypeScriptView Raw
1import type { Container } from "./Container";
2import type { ICoordinates } from "./Interfaces/ICoordinates";
3import type { IMouseData } from "./Interfaces/IMouseData";
4import type { IRgb } from "./Interfaces/Colors";
5import { Particle } from "./Particle";
6import { QuadTree } from "../Utils";
7import type { RecursivePartial } from "../Types";
8import type { IParticles } from "../Options/Interfaces/Particles/IParticles";
9import type { IDelta } from "./Interfaces/IDelta";
10import type { IParticle } from "./Interfaces/IParticle";
11export declare class Particles {
12 private readonly container;
13 get count(): number;
14 quadTree: QuadTree;
15 linksColors: Map<string, string | IRgb | undefined>;
16 limit: number;
17 array: Particle[];
18 pushing?: boolean;
19 linksColor?: IRgb | string;
20 grabLineColor?: IRgb | string;
21 private interactionManager;
22 private nextId;
23 private linksFreq;
24 private trianglesFreq;
25 constructor(container: Container);
26 init(): void;
27 redraw(): void;
28 removeAt(index: number, quantity?: number, override?: boolean): void;
29 remove(particle: Particle, override?: boolean): void;
30 update(delta: IDelta): void;
31 draw(delta: IDelta): void;
32 clear(): void;
33 push(nb: number, mouse?: IMouseData, overrideOptions?: RecursivePartial<IParticles>): void;
34 addParticle(position?: ICoordinates, overrideOptions?: RecursivePartial<IParticles>): Particle | undefined;
35 addSplitParticle(parent: Particle): Particle | undefined;
36 removeQuantity(quantity: number): void;
37 getLinkFrequency(p1: IParticle, p2: IParticle): number;
38 getTriangleFrequency(p1: IParticle, p2: IParticle, p3: IParticle): number;
39 setDensity(): void;
40 private applyDensity;
41 private initDensityFactor;
42 private pushParticle;
43}