Get started with tsparticles-interaction-external-trail CDN

MIT licensed

Extends tsparticles.js with trail effect for interactive particles.

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-trail CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with tsparticles-interaction-external-trail CDN - cdnhub.io</title>
  <style>
    #tsparticles {
      height: 100vh;
      width: 100%;
    }
  </style>
</head>
<body>
  <div id="tsparticles"></div>
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/worksans.min.css"></script>
  <script src="https://cdn.skypack.dev/[email protected]/build/three.min.js"></script>
  <script src="https://cdn.cdnhub.io/tsparticles-interaction-external-trail/2.12.0/tsparticles.interaction.external.trail.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/tsparticles.min.js"></script>

  <script>
    const particles = new TSParticles({
      container: document.querySelector("#tsparticles"),
      backgroundMode: {
        enable: true,
        color: "#000000",
        opacity: 0.5,
      },
      fpsLimit: 60,
      interactivity: {
        events: {
          onClick: {
            enable: true,
            mode: "repulse",
          },
          onHover: {
            enable: true,
            mode: "grab",
          },
          resize: true,
        },
        modes: {
          grab: {
            distance: 150,
            linkDistance: 100,
          },
          repulse: {
            distance: 200,
            duration: 0.4,
          },
        },
      },
      particles: {
        color: {
          value: "#ffffff",
          animation: {
            enable: true,
            speed: 1,
            sync: false,
          },
        },
        links: {
          color: "#ffffff",
          distance: 150,
          opacity: 0.5,
          width: 1,
        },
        move: {
          direction: "none",
          enable: true,
          outMode: "out",
          random: false,
          speed: 1,
        },
        size: {
          value: 5,
          animation: {
            enable: true,
            minimumValue: 0.1,
            speed: 1,
            sync: false,
          },
        },
        opacity: {
          value: 0.5,
          animation: {
            enable: true,
            minimumValue: 0.1,
            speed: 1,
            sync: false,
          },
        },
      },
      interactivity: {
        trail: {
          enable: true,
          length: 0.1,
          color: "#ffffff",
          opacity: 0.5,
          size: 1,
        },
      },
      debug: {
        show: false,
      },
      style: {
        points: {
          strokeWidth: 1,
          strokeOpacity: 0.5,
          strokeColor: "#ffffff",
        },
      },
    });

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

All versions