Skip to content

Commit e30d3a5

Browse files
authored
Update app.js
1 parent 89a4adf commit e30d3a5

File tree

1 file changed

+15
-41
lines changed

1 file changed

+15
-41
lines changed

assets/js/app.js

Lines changed: 15 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
1-
// ParticlesJS Configuration
21
particlesJS('particles-js',
2+
33
{
44
"particles": {
55
"number": {
6-
"value": 200,
6+
"value": 200, // Increased particle count
77
"density": {
88
"enable": true,
99
"value_area": 800
1010
}
1111
},
1212
"color": {
13-
"value": ["#00fffc", "#fc00ff", "#fffc00"]
13+
"value": ["#00fffc", "#fc00ff", "#fffc00"] // Randomized particle colors
1414
},
1515
"shape": {
1616
"type": "circle",
@@ -24,9 +24,9 @@ particlesJS('particles-js',
2424
},
2525
"opacity": {
2626
"value": 0.7,
27-
"random": true,
27+
"random": true, // Random opacity for variation
2828
"anim": {
29-
"enable": true,
29+
"enable": true, // Enable opacity animation
3030
"speed": 1,
3131
"opacity_min": 0.1,
3232
"sync": false
@@ -36,28 +36,28 @@ particlesJS('particles-js',
3636
"value": 4,
3737
"random": true,
3838
"anim": {
39-
"enable": true,
39+
"enable": true, // Enable size animation
4040
"speed": 10,
4141
"size_min": 0.3,
4242
"sync": false
4343
}
4444
},
4545
"line_linked": {
4646
"enable": true,
47-
"distance": 120,
47+
"distance": 120, // Decreased distance for tighter connections
4848
"color": "#ffffff",
4949
"opacity": 0.5,
5050
"width": 1.5
5151
},
5252
"move": {
5353
"enable": true,
54-
"speed": 4,
54+
"speed": 4, // Slightly slower movement for a smoother effect
5555
"direction": "none",
5656
"random": false,
5757
"straight": false,
5858
"out_mode": "out",
5959
"attract": {
60-
"enable": true,
60+
"enable": true, // Enable attraction effect
6161
"rotateX": 600,
6262
"rotateY": 1200
6363
}
@@ -68,7 +68,7 @@ particlesJS('particles-js',
6868
"events": {
6969
"onhover": {
7070
"enable": true,
71-
"mode": ["grab", "bubble", "repulse"]
71+
"mode": ["grab", "bubble", "repulse"] // Enable multiple modes on hover
7272
},
7373
"onclick": {
7474
"enable": true,
@@ -105,43 +105,17 @@ particlesJS('particles-js',
105105
"retina_detect": true,
106106
"config_demo": {
107107
"hide_card": false,
108-
"background_color": "#1a2a6c",
108+
"background_color": "#1a2a6c", // Gradient start color
109109
"background_image": "",
110110
"background_position": "50% 50%",
111111
"background_repeat": "no-repeat",
112112
"background_size": "cover",
113113
"background_gradient": {
114-
"type": "radial",
115-
"colors": ["#1a2a6c", "#b21f1f", "#fdbb2d"],
116-
"direction": "center"
114+
"type": "radial", // Radial gradient effect
115+
"colors": ["#1a2a6c", "#b21f1f", "#fdbb2d"], // Gradient colors
116+
"direction": "center" // Gradient direction
117117
}
118118
}
119119
}
120-
);
121-
122-
// Cursor-following dot implementation
123-
const cursorDot = document.createElement("div");
124-
cursorDot.style.position = "fixed";
125-
cursorDot.style.width = "10px";
126-
cursorDot.style.height = "10px";
127-
cursorDot.style.backgroundColor = "black";
128-
cursorDot.style.borderRadius = "50%";
129-
cursorDot.style.pointerEvents = "none";
130-
cursorDot.style.zIndex = "1000";
131-
cursorDot.style.transition = "transform 0.1s ease";
132-
document.body.appendChild(cursorDot);
133-
134-
let mouseX = 0, mouseY = 0;
135-
136-
// Smooth motion effect
137-
document.addEventListener("mousemove", (event) => {
138-
mouseX = event.clientX;
139-
mouseY = event.clientY;
140-
});
141120

142-
// Animation loop for smooth motion
143-
function animateDot() {
144-
cursorDot.style.transform = `translate(${mouseX - 5}px, ${mouseY - 5}px)`;
145-
requestAnimationFrame(animateDot);
146-
}
147-
animateDot();
121+
);

0 commit comments

Comments
 (0)