Skip to content

Commit

Permalink
feat: show less particules in mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
marcolivierbouch committed Nov 27, 2024
1 parent cd5b39e commit 529f90d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion websites/customdomainready/components/ParticleBackground.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ export const ParticleBackground: React.FC = () => {
let animationFrameId: number;

const particles: Particle[] = [];
const particleCount = 100;
const isMobile = window.innerWidth <= 768; // Assuming mobile if width is 768px or less
const particleCount = isMobile ? 25 : 100; // 4 times less particles on mobile
const connectionDistance = 100;

// Set canvas size
Expand Down

0 comments on commit 529f90d

Please sign in to comment.