UNPKG

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.

51 lines (50 loc) 2.14 kB
import type { IStroke } from "../../Options/Interfaces/Particles/IStroke"; import type { ICoordinates } from "./ICoordinates"; import type { MoveDirection, MoveDirectionAlt, ShapeType } from "../../Enums"; import type { IParticleImage } from "./IParticleImage"; import type { IParticleValueAnimation } from "./IParticleValueAnimation"; import type { IShapeValues } from "../../Options/Interfaces/Particles/Shape/IShapeValues"; import type { IBubbleParticleData } from "./IBubbleParticleData"; import type { IParticles } from "../../Options/Interfaces/Particles/IParticles"; import type { IHsl, IRgb } from "./Colors"; import type { ILink } from "./ILink"; import type { IParticleHslAnimation } from "./IParticleHslAnimation"; import type { Vector } from "../Particle/Vector"; export interface IParticle { misplaced: boolean; randomIndexData?: number; readonly bubble: IBubbleParticleData; readonly close: boolean; readonly destroyed: boolean; readonly direction: MoveDirection | keyof typeof MoveDirection | MoveDirectionAlt; readonly fill: boolean; readonly id: number; readonly image?: IParticleImage; readonly initialVelocity: Vector; readonly links: ILink[]; readonly offset: Vector; readonly color?: IParticleHslAnimation; readonly opacity: IParticleValueAnimation<number>; readonly rotate: IParticleValueAnimation<number>; readonly size: IParticleValueAnimation<number>; 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 sizeValue?: number; readonly sizeAnimationSpeed?: number; getPosition(): ICoordinates; getRadius(): number; getMass(): number; getFillColor(): IHsl | undefined; getStrokeColor(): IHsl | undefined; }