Skip to content

Commit 7f89ae6

Browse files
authored
Update ParticlesBackground.tsx
1 parent b1c2a96 commit 7f89ae6

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

app/components/ParticlesBackground.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ const ParticlesBackground: React.FC = () => {
1616
type P = { x: number; y: number; vx: number; vy: number; size: number; opacity: number };
1717
const particles: P[] = Array.from({ length: 55 }, () => ({
1818
x: Math.random() * w,
19-
y: Math.random() * h,
20-
vx: (Math.random() - 0.5) * 0.45,
21-
vy: (Math.random() - 0.5) * 0.45,
22-
size: Math.random() * 1.5 + 0.5,
23-
opacity: Math.random() * 0.5 + 0.15,
19+
y: Math.random() * h,
20+
vx: (Math.random() - 0.5) * 0.45,
21+
vy: (Math.random() - 0.5) * 0.45,
22+
size: Math.random() * 1.5 + 0.5,
23+
opacity: Math.random() * 0.5 + 0.15,
2424
}));
2525

2626
const CONN = 130;
@@ -34,7 +34,7 @@ const ParticlesBackground: React.FC = () => {
3434
if (p.y < 0 || p.y > h) p.vy *= -1;
3535
ctx.beginPath();
3636
ctx.arc(p.x, p.y, p.size, 0, Math.PI * 2);
37-
ctx.fillStyle = `rgba(0,255,65,${p.opacity})`;
37+
ctx.fillStyle = `rgba(42,143,255,${p.opacity})`;
3838
ctx.fill();
3939
}
4040
for (let i = 0; i < particles.length; i++) {
@@ -66,8 +66,8 @@ const ParticlesBackground: React.FC = () => {
6666

6767
return (
6868
<canvas
69-
ref={canvasRef}
70-
style={{ position: 'fixed', inset: 0, pointerEvents: 'none', zIndex: 0, opacity: 0.45 }}
69+
ref={canvasRef}
70+
style={{ position: 'fixed', inset: 0, pointerEvents: 'none', zIndex: 0, opacity: 0.45 }}
7171
/>
7272
);
7373
};

0 commit comments

Comments
 (0)