Get started with tsparticles-interaction-external-repulse CDN

MIT licensed

The tsparticles-interaction-external-repulse library enhances the tsparticles JS particle system by adding a repulsion force between particles, creating a more dynamic and interactive effect.

Tags:
  • tsparticles
  • particles.js
  • particlesjs
  • particles
  • particle
  • canvas
  • jsparticles
  • xparticles
  • particles-js
  • particles-bg
  • particles-bg-vue
  • particles-ts
  • particles.ts
  • react-particles-js
  • react-particles.js
  • react-particles
  • react
  • reactjs
  • vue-particles
  • ngx-particles
  • angular-particles
  • particleground
  • vue
  • vuejs
  • preact
  • preactjs
  • jquery
  • angularjs
  • angular
  • typescript
  • javascript
  • animation
  • web
  • html5
  • web-design
  • webdesign
  • css
  • html
  • css3
  • animated
  • background
  • confetti
  • fireworks
  • fireworks-js
  • confetti-js
  • confettijs
  • fireworksjs
  • canvas-confetti

Stable version

Copied!

How to start using tsparticles-interaction-external-repulse CDN


<!DOCTYPE html>
<html>
<head>
  <style>
    #tsparticles {
      height: 100vh;
      width: 100vw;
    }
  </style>
  <script src="https://cdnjs.cloudflare.com/ajax/libs/tsparticles/r118/tsparticles.min.js"></script>
  <script src="https://cdn.cdnhub.io/tsparticles-interaction-external-repulse/2.12.0/tsparticles.interaction.external.repulse.min.js"></script>
</head>
<body>
  <div id="tsparticles"></div>
  <script>
    const particles = new TSParticles({
      container: document.querySelector("#tsparticles"),
      backgroundMode: {
        enable: true,
        color: "#000",
        opacity: 0.5,
      },
      fpsLimit: 60,
      interactivity: {
        events: {
          onClick: {
            enable: true,
            mode: "repulse",
          },
        },
        modes: {
          repulse: {
            distance: 100,
            duration: 0.4,
          },
        },
      },
      particles: {
        color: {
          value: "#ffffff",
        },
        links: {
          color: "#ffffff",
          distance: 150,
          enable: true,
          opacity: 0.5,
          width: 1,
        },
        collisions: {
          enable: true,
        },
        move: {
          direction: "none",
          enable: true,
          outModes: {
            default: "bounce",
          },
        },
        size: {
          value: 5,
        },
      },
      interactivity: {
        repulse: {
          distance: 200,
          duration: 0.4,
        },
      },
    });

    particles.add(true);
  </script>
</body>
</html>
Copied!
Copied!

All versions