UNPKG

2.95 kBTypeScriptView Raw
1import type { Container } from "./Container";
2import type { IParticles } from "../Options/Interfaces/Particles/IParticles";
3import { ParticlesOptions } from "../Options/Classes/Particles/ParticlesOptions";
4import { ShapeType } from "../Enums";
5import type { RecursivePartial } from "../Types";
6import type { Stroke } from "../Options/Classes/Particles/Stroke";
7import { Vector } from "./Particle/Vector";
8import type { IBubbleParticleData, ICoordinates, ICoordinates3d, IDelta, IHsl, IParticle, IParticleGradientAnimation, IParticleHslAnimation, IParticleLife, IParticleNumericValueAnimation, IParticleSpin, IParticleTiltValueAnimation, IParticleValueAnimation, IRgb, IShapeValues, IParticleRetinaProps } from "./Interfaces";
9import { Vector3d } from "./Particle/Vector3d";
10import { IParticleRoll } from "./Interfaces/IParticleRoll";
11import { IParticleWobble } from "./Interfaces/IParticleWobble";
12export declare class Particle implements IParticle {
13 readonly id: number;
14 readonly container: Container;
15 readonly group?: string | undefined;
16 destroyed: boolean;
17 lastPathTime: number;
18 misplaced: boolean;
19 spawning: boolean;
20 splitCount: number;
21 unbreakable: boolean;
22 readonly pathDelay: number;
23 readonly sides: number;
24 readonly options: ParticlesOptions;
25 readonly life: IParticleLife;
26 roll?: IParticleRoll;
27 wobble?: IParticleWobble;
28 backColor?: IHsl;
29 close: boolean;
30 fill: boolean;
31 randomIndexData?: number;
32 gradient?: IParticleGradientAnimation;
33 rotate?: IParticleValueAnimation<number>;
34 tilt?: IParticleTiltValueAnimation;
35 color?: IParticleHslAnimation;
36 opacity?: IParticleNumericValueAnimation;
37 strokeWidth?: number;
38 stroke?: Stroke;
39 strokeColor?: IParticleHslAnimation;
40 readonly moveDecay: number;
41 readonly direction: number;
42 readonly position: Vector3d;
43 readonly offset: Vector;
44 readonly shadowColor: IRgb | undefined;
45 readonly size: IParticleNumericValueAnimation;
46 readonly velocity: Vector;
47 readonly shape: ShapeType | string;
48 readonly spin?: IParticleSpin;
49 readonly initialPosition: Vector;
50 readonly initialVelocity: Vector;
51 readonly shapeData?: IShapeValues;
52 readonly bubble: IBubbleParticleData;
53 readonly zIndexFactor: number;
54 readonly retina: IParticleRetinaProps;
55 constructor(id: number, container: Container, position?: ICoordinates, overrideOptions?: RecursivePartial<IParticles>, group?: string | undefined);
56 isVisible(): boolean;
57 isInsideCanvas(): boolean;
58 draw(delta: IDelta): void;
59 getPosition(): ICoordinates3d;
60 getRadius(): number;
61 getMass(): number;
62 getFillColor(): IHsl | undefined;
63 getStrokeColor(): IHsl | undefined;
64 destroy(override?: boolean): void;
65 reset(): void;
66 private split;
67 private calcPosition;
68 private checkOverlap;
69 private calculateVelocity;
70 private loadShapeData;
71 private loadLife;
72}