UNPKG

2.35 kBTypeScriptView Raw
1import type { IStroke } from "../../Options/Interfaces/Particles/IStroke";
2import type { ICoordinates3d } from "./ICoordinates";
3import type { ShapeType } from "../../Enums";
4import type { IParticleTiltValueAnimation, IParticleValueAnimation } from "./IParticleValueAnimation";
5import type { IShapeValues } from "./IShapeValues";
6import type { IBubbleParticleData } from "./IBubbleParticleData";
7import type { IParticles } from "../../Options/Interfaces/Particles/IParticles";
8import type { IHsl, IRgb } from "./Colors";
9import type { IParticleHslAnimation } from "./IParticleHslAnimation";
10import type { Vector } from "../Particle/Vector";
11import type { IParticleGradientAnimation } from "./IParticleGradientAnimation";
12import type { IParticleRetinaProps } from "./IParticleRetinaProps";
13import type { IParticleRoll } from "./IParticleRoll";
14import type { IParticleWobble } from "./IParticleWobble";
15export interface IParticle {
16 misplaced: boolean;
17 randomIndexData?: number;
18 readonly roll?: IParticleRoll;
19 readonly wobble?: IParticleWobble;
20 readonly bubble: IBubbleParticleData;
21 readonly close: boolean;
22 readonly destroyed: boolean;
23 readonly direction: number;
24 readonly fill: boolean;
25 readonly id: number;
26 readonly initialVelocity: Vector;
27 readonly offset: Vector;
28 readonly color?: IParticleHslAnimation;
29 readonly gradient?: IParticleGradientAnimation;
30 readonly backColor?: IHsl;
31 readonly opacity?: IParticleValueAnimation<number>;
32 readonly rotate?: IParticleValueAnimation<number>;
33 readonly size: IParticleValueAnimation<number>;
34 readonly tilt?: IParticleTiltValueAnimation;
35 readonly strokeColor?: IParticleHslAnimation;
36 readonly options: IParticles;
37 readonly position: Vector;
38 readonly shadowColor: IRgb | undefined;
39 readonly shape?: ShapeType | string;
40 readonly shapeData?: IShapeValues;
41 readonly sides: number;
42 readonly stroke?: IStroke;
43 readonly strokeWidth?: number;
44 readonly velocity: Vector;
45 readonly orbitRotation?: number;
46 readonly orbitColor?: IHsl;
47 readonly retina: IParticleRetinaProps;
48 getPosition(): ICoordinates3d;
49 getRadius(): number;
50 getMass(): number;
51 getFillColor(): IHsl | undefined;
52 getStrokeColor(): IHsl | undefined;
53 isVisible(): boolean;
54 isInsideCanvas(): boolean;
55}