-
Notifications
You must be signed in to change notification settings - Fork 32
/
particle.js
78 lines (72 loc) · 1.96 KB
/
particle.js
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
particlesJS("background", {
particles: {
number: {
value: 15, // Number of Particles (count)
density: {
enable: true,
value_area: 300, // Area where particles will be distributed
},
},
color: {
value: "#ffffff", // Particles color
},
shape: {
type: "triangle", // Shape type
},
opacity: {
value: 0.8, // Base opacity of particles
random: true,
anum: {
enable: true,
speed: 1,
opacity_min: 0.1,
sync: false,
},
},
size: {
value: 5, // Base size of particles
random: true,
anim: {
enable: true,
speed: 4,
size_min: 0.3,
sync: false,
},
},
// Connecting lines
line_linked: {
enable: true,
distance: 150, // Maximum distance between linked particles
color: "#ffffff",
opacity: 0.4,
width: 1,
},
// Particle movement
move: {
enable: true,
speed: 2,
direction: "none",
random: false,
straight: false,
out_mode: "bounce", // Behavior when particles move out of the canvas
bounce: false,
},
},
// Interactivity settings
interactivity: {
detect_on: "canvas",
events: {
onhover: {
enable: true, // Enable hover interactivity
mode: "repulse",
},
onclick: {
enable: true, // Enable for click
mode: "push", // Push particles on click
},
resize: true, // Resize particles animation on window resize
},
},
// Detect retina displays
retina_detect: true,
});