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.
60 lines (59 loc) • 2.4 kB
TypeScript
import { IStroke } from "../../Options/Interfaces/Particles/IStroke";
import { ICoordinates3d } from "./ICoordinates";
import { ShapeType } from "../../Enums";
import { IParticleTiltValueAnimation, IParticleValueAnimation } from "./IParticleValueAnimation";
import { IShapeValues } from "./IShapeValues";
import { IBubbleParticleData } from "./IBubbleParticleData";
import { IParticles } from "../../Options/Interfaces/Particles/IParticles";
import { IHsl, IRgb } from "./Colors";
import { IParticleHslAnimation } from "./IParticleHslAnimation";
import { Vector } from "../Particle/Vector";
import { IParticleGradientAnimation } from "./IParticleGradientAnimation";
export interface IParticle {
misplaced: boolean;
randomIndexData?: number;
readonly rollAngle: number;
readonly rollSpeed: number;
readonly wobbleAngle: number;
readonly wobbleSpeed: number;
readonly attractDistance?: number;
readonly bubble: IBubbleParticleData;
readonly close: boolean;
readonly destroyed: boolean;
readonly direction: number;
readonly fill: boolean;
readonly id: number;
readonly initialVelocity: Vector;
readonly offset: Vector;
readonly color?: IParticleHslAnimation;
readonly gradient?: IParticleGradientAnimation;
readonly backColor?: IHsl;
readonly opacity: IParticleValueAnimation<number>;
readonly rotate: IParticleValueAnimation<number>;
readonly size: IParticleValueAnimation<number>;
readonly tilt: IParticleTiltValueAnimation;
readonly strokeColor?: IParticleHslAnimation;
readonly options: IParticles;
readonly position: Vector;
readonly shadowColor: IRgb | undefined;
readonly shape?: ShapeType | string;
readonly shapeData?: IShapeValues;
readonly sides: number;
readonly stroke: IStroke;
readonly strokeWidth: number;
readonly velocity: Vector;
readonly linksDistance?: number;
readonly linksWidth?: number;
readonly moveSpeed?: number;
readonly sizeAnimationSpeed?: number;
readonly orbitRadius?: number;
readonly orbitRotation?: number;
readonly orbitColor?: IHsl;
getPosition(): ICoordinates3d;
getRadius(): number;
getMass(): number;
getFillColor(): IHsl | undefined;
getStrokeColor(): IHsl | undefined;
isVisible(): boolean;
isInsideCanvas(): boolean;
}