/
Types.ts
60 lines (54 loc) · 1.37 KB
/
Types.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import type {
BackgroundMask,
Container,
ICoordinates,
IDimension,
IParticlesOptions,
IRgb,
Particle,
ParticlesOptions,
} from "@tsparticles/engine";
import type { ILink } from "./Interfaces.js";
import type { ILinks } from "./Options/Interfaces/ILinks.js";
import type { Links } from "./Options/Classes/Links.js";
export type LinkContainer = Container & {
particles: {
linksColor?: IRgb | string;
linksColors: Map<string, IRgb | string | undefined>;
};
};
export type LinkParticle = Particle & {
links?: ILink[];
options: ParticlesLinkOptions;
retina: {
linksDistance?: number;
linksWidth?: number;
};
};
export interface LinkLineDrawParams {
backgroundMask: BackgroundMask;
begin: ICoordinates;
canvasSize: IDimension;
colorLine: IRgb;
context: CanvasRenderingContext2D;
end: ICoordinates;
links: Links;
maxDistance: number;
opacity: number;
width: number;
}
export interface LinkTriangleDrawParams {
backgroundMask: BackgroundMask;
colorTriangle: IRgb;
context: CanvasRenderingContext2D;
opacityTriangle: number;
pos1: ICoordinates;
pos2: ICoordinates;
pos3: ICoordinates;
}
export type IParticlesLinkOptions = IParticlesOptions & {
links?: ILinks;
};
export type ParticlesLinkOptions = ParticlesOptions & {
links?: Links;
};