UNPKG

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