Get started with tsparticles-shape-rounded-rect CDN

MIT licensed

Library tsparticles-shape-rounded-rect adds rounded rectangular shapes to tsparticles particle system.

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-shape-rounded-rect CDN


<!DOCTYPE html>
<html>
<head>
  <title>Get started with tsparticles-shape-rounded-rect CDN - cdnhub.io</title>
  <style>
    #tsparticles {
      height: 100vh;
      width: 100%;
    }
  </style>
</head>
<body>
  <div id="tsparticles"></div>
  <script src="https://cdn.jsdelivr.net/npm/worksans@4.2.0/worksans.min.css"></script>
  <script src="https://cdn.jsdelivr.net/npm/@tsparticles/core@5.1.2/tsparticles.min.js"></script>
  <script src="https://cdn.cdnhub.io/tsparticles-shape-rounded-rect/2.12.0/tsparticles.shape.rounded-rect.min.js"></script>

  <script>
    const particlesInit = async () => {
      await tsparticles.load('tsparticles', {
        container: 'tsparticles',
        shape: 'roundedRect',
        options: {
          numParticles: 100,
          size: {
            min: 1,
            max: 5
          },
          opacity: {
            min: 0.1,
            max: 0.5
          },
          move: {
            direction: 'none',
            enable: false
          },
          color: {
            value: '#ffffff'
          },
          interact: {
            events: {
              onHover: {
                enable: true,
                mode: 'repulse'
              }
            },
            modes: {
              grab: {
                distance: 400,
                lineLinked: {
                  opacity: 0.4,
                  width: 1
                }
              },
              repulse: {
                distance: 200,
                duration: 0.4
              },
              push: {
                particles: {
                  quantity: 4
                }
              },
              remove: {
                quantity: 1
              }
            }
          },
          customShape: {
            name: 'roundedRect',
            options: {
              corners: [
                { x: 0.5, y: 0.5, radius: 0.5 },
                { x: 0.5, y: 0.5, radius: 0.5 },
                { x: 0.5, y: 0.5, radius: 0.5 },
                { x: 0.5, y: 0.5, radius: 0.5 },
                { x: 0.5, y: 0.5, radius: 0.5 },
                { x: 0.5, y: 0.5, radius: 0.5 },
                { x: 0.5, y: 0.5, radius: 0.5 },
                { x: 0.5, y: 0.5, radius: 0.5 }
              ]
            }
          }
        }
      });
    };

    particlesInit();
  </script>
</body>
</html>
Copied!
Copied!

All versions