Get started with tsparticles-shape-cog CDN

MIT licensed

TSParticles-shape-cog: cog wheel animation in library.

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


<!DOCTYPE html>
<html>
<head>
  <script src="https://cdn.jsdelivr.net/npm/tsparticles@3.3.2/dist/js/tsparticles.min.js"></script>
  <link href="https://cdn.jsdelivr.net/npm/tsparticles@3.3.2/dist/css/tsparticles.min.css" rel="stylesheet">
  <link href="https://cdn.jsdelivr.net/npm/tsparticles@3.3.2/dist/css/parts/blobs.min.css" rel="stylesheet">
  <script src="https://cdn.cdnhub.io/tsparticles-shape-cog/2.12.0/tsparticles.shape.cog.min.js"></script>
  <style>
    #tsparticles {
      height: 100vh;
      width: 100%;
    }
  </style>
</head>
<body>
  <div id="tsparticles"></div>
  <script>
    const particles = new TSParticles({
      container: document.querySelector('#tsparticles'),
      backgroundMode: {
        enable: true,
        color: '#000000',
        opacity: 0.5
      },
      fpsLimit: 60,
      particles: {
        number: {
          value: 100,
          density: {
            enable: true,
            valueArea: 800
          }
        },
        color: {
          value: '#ffffff'
        },
        shape: {
          type: 'cog'
        },
        size: {
          value: 20,
          random: true,
          anim: {
            enable: false,
            speed: 1,
            size_min: 0,
            sync: false
          }
        },
        opacity: {
          value: 0.5,
          random: true,
          anim: {
            enable: false,
            speed: 1,
            opacity_min: 0.1
          }
        },
        lineLinked: {
          enable: false,
          distance: 150,
          color: '#ffffff',
          opacity: 0.4,
          width: 1
        },
        move: {
          enable: true,
          speed: 1,
          direction: 'none',
          random: true,
          straight: false,
          out_mode: 'out'
        }
      },
      interactivity: {
        detectsOn: 'canvas',
        events: {
          onHover: {
            enable: true,
            mode: 'repulse'
          },
          onClick: {
            enable: true,
            mode: 'push'
          },
          resize: true
        },
        modes: {
          grab: {
            distance: 400,
            lineLinked: {
              opacity: 1
            }
          },
          bubble: {
            distance: 400,
            size: 40,
            duration: 2,
            opacity: 8,
            speed: 3
          },
          repulse: {
            distance: 200,
            duration: 0.4
          },
          push: {
            particles_nb: 4
          },
          trail: {
            enable: false,
            length: 10,
            color: '#000000'
          },
          grabTrail: {
            enable: false,
            length: 10,
            color: '#000000'
          }
        }
      },
      retinaDetect: true
    });

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

All versions