Get started with tsparticles-fireworks CDN
MIT licensed
TSParticles-Fireworks is a library for creating dynamic, interactive fireworks effects in Three.js.
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-fireworks CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with tsparticles-fireworks CDN - cdnhub.io</title>
<style>
body { margin: 0; }
canvas { width: 100%; height: 100vh; }
</style>
</head>
<body>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/worksans.css"></script>
<script src="https://cdn.cdnhub.io/tsparticles-fireworks/2.12.0/tsparticles.fireworks.bundle.min.js"></script>
<script>
const particleContainer = document.createElement('div');
document.body.appendChild(particleContainer);
particleContainer.style.position = 'fixed';
particleContainer.style.top = '0';
particleContainer.style.left = '0';
particleContainer.style.width = '100%';
particleContainer.style.height = '100vh';
const particlesInit = async () => {
await tsp.load('tsparticles', 'https://cdn.cdnhub.io/tsparticles-fireworks/2.12.0/tsparticles.fireworks.bundle.min.js');
const particleSystem = tsp.load('tsparticles', particleContainer, {
background: {
color: '#000'
},
fx: {
type: 'fireworks',
settings: {
maxParticles: 100,
maxDistance: 500,
speed: 1,
frequency: 0.1,
size: {
value: 10,
random: true,
anim: {
type: 'sine',
property: 'size',
speed: 1,
amplitude: 5
}
},
color: {
value: '#ff0000',
random: true,
anim: {
type: 'random',
properties: ['hue']
}
},
lifespan: {
value: 1000,
random: true,
anim: {
type: 'random',
property: 'lifespan',
minValue: 500,
maxValue: 2000
}
},
opacity: {
anim: {
type: 'random',
property: 'opacity',
minValue: 0.1,
maxValue: 0.5
}
},
velocity: {
value: [0, 0],
random: true,
anim: {
type: 'random',
property: 'velocity.x',
minValue: -5,
maxValue: 5
}
}
}
}
});
particleSystem.play();
};
particlesInit();
</script>
</body>
</html>
Copied!
Copied!
Copied!
Copied!