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.
44 lines (43 loc) • 1.79 kB
TypeScript
import type { Container } from "./Container";
import type { ICoordinates } from "./Interfaces/ICoordinates";
import type { IMouseData } from "./Interfaces/IMouseData";
import type { IRgb } from "./Interfaces/Colors";
import { Particle } from "./Particle";
import { QuadTree } from "../Utils";
import type { RecursivePartial } from "../Types";
import type { IParticles } from "../Options/Interfaces/Particles/IParticles";
import type { IDelta } from "./Interfaces/IDelta";
import type { IParticle } from "./Interfaces/IParticle";
export declare class Particles {
private readonly container;
get count(): number;
quadTree: QuadTree;
linksColors: Map<string, string | IRgb | undefined>;
limit: number;
array: Particle[];
pushing?: boolean;
linksColor?: IRgb | string;
grabLineColor?: IRgb | string;
private interactionManager;
private nextId;
private linksFreq;
private trianglesFreq;
constructor(container: Container);
init(): void;
redraw(): void;
removeAt(index: number, quantity?: number, override?: boolean): void;
remove(particle: Particle, override?: boolean): void;
update(delta: IDelta): void;
draw(delta: IDelta): void;
clear(): void;
push(nb: number, mouse?: IMouseData, overrideOptions?: RecursivePartial<IParticles>): void;
addParticle(position?: ICoordinates, overrideOptions?: RecursivePartial<IParticles>): Particle | undefined;
addSplitParticle(parent: Particle): Particle | undefined;
removeQuantity(quantity: number): void;
getLinkFrequency(p1: IParticle, p2: IParticle): number;
getTriangleFrequency(p1: IParticle, p2: IParticle, p3: IParticle): number;
setDensity(): void;
private applyDensity;
private initDensityFactor;
private pushParticle;
}