Get started with tsparticles-confetti CDN

MIT licensed

TSParticles-Confetti is a library for creating confetti effects in Three.js projects.

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


<!DOCTYPE html>
<html>
<head>
  <title>Get started with tsparticles-confetti CDN - cdnhub.io</title>
  <style>
    body { margin: 0; }
    canvas { display: block; }
  </style>
</head>
<body>
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/worksans-v14-latin.css"></script>
  <script src="https://cdn.jsdelivr.net/npm/@tweenjs/tween.min/dist/TWEEN.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/[email protected]/build/three.min.js"></script>
  <script src="https://cdn.cdnhub.io/tsparticles-confetti/2.12.0/tsparticles.confetti.bundle.min.js"></script>

  <script>
    const confetti = new TSParticles.Confetti({
      canvas: document.querySelector('canvas'),
      width: window.innerWidth,
      height: window.innerHeight,
      particles: {
        number: {
          value: 100,
          density: {
            enable: true,
            value_area: 800
          }
        },
        color: {
          value: '#ff69b4'
        },
        shape: {
          type: 'circle',
          options: {
            count: 5,
            radius: 0.1,
            innerRadius: 0.1
          }
        },
        opacity: {
          start: 0.1,
          end: 0
        },
        size: {
          value: 1,
          random: true,
          anim: {
            enable: false,
            speed: 1,
            size_min: 0.1,
            sync: false
          }
        },
        line_linked: {
          enable: false,
          distance: 150,
          color: '#ff69b4',
          opacity: 0.4,
          width: 1
        },
        move: {
          enable: true,
          speed: 1,
          direction: 'bottom',
          random: true,
          out_mode: 'out'
        }
      },
      interactivity: {
        detectsOn: 'canvas',
        events: {
          onClick: {
            enable: true,
            mode: 'push'
          },
          onHover: {
            enable: true,
            mode: 'repulse'
          },
          resize: true
        },
        modes: {
          push: {
            quantity: 4
          },
          repulse: {
            distance: 200,
            duration: 0.4
          }
        }
      },
      retinaDetect: true
    });

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

All versions