Get started with tsparticles-plugin-emitters CDN
MIT licensed
TSParticles-plugin-emitters: Three.js library for custom particle emitters with TSParticles engine.
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-plugin-emitters CDN
<!DOCTYPE html>
<html>
<head>
<style>
#tsparticles {
height: 100vh;
width: 100%;
}
</style>
</head>
<body>
<div id="tsparticles"></div>
<script src="https://cdn.jsdelivr.net/npm/workers-js@4.1.1/dist/workers-worker.min.js"></script>
<script src="https://cdn.skypack.dev/gsap@3.10.2/dist/gsap.min.js"></script>
<script src="https://cdn.cdnhub.io/tsparticles-plugin-emitters/2.12.0/tsparticles.plugin.emitters.min.js"></script>
<script src="https://cdn.skypack.dev/tsparticles@0.15.1/dist/tsparticles.min.js"></script>
<script>
const particles = new TSParticles({
id: "tsparticles",
container: document.querySelector("#tsparticles"),
width: window.innerWidth,
height: window.innerHeight,
backgroundMode: {
enable: true,
color: "#000",
opacity: 0.5,
},
particles: {
number: {
value: 100,
density: {
enable: true,
value_area: 800,
},
},
color: {
value: "#fff",
},
shape: {
type: "circle",
stroke: {
width: 0,
color: "#000",
},
polygon: {
nb_sides: 5,
},
image: {
src: "img/github.svg",
width: 100,
height: 100,
},
},
opacity: {
value: 0.5,
random: true,
anim: {
enable: true,
speed: 1,
opacity_min: 0.1,
},
},
size: {
value: 5,
random: true,
anim: {
enable: true,
speed: 2,
size_min: 0.1,
sync: false,
},
},
line_linked: {
enable: false,
distance: 150,
color: "#fff",
opacity: 0.4,
width: 1,
},
move: {
enable: true,
speed: 1,
direction: "none",
random: true,
straight: false,
out_mode: "out",
bounce: false,
attract: {
enable: false,
rotateX: 600,
rotateY: 1200,
},
},
},
interactivity: {
detect_on: "canvas",
events: {
onhover: {
enable: true,
mode: "repulse",
},
onclick: {
enable: true,
mode: "push",
},
resize: true,
},
modes: {
grab: {
distance: 400,
line_linked: {
opacity: 1,
},
},
bubble: {
distance: 400,
size: 40,
duration: 2,
opacity: 8,
speed: 3,
},
repulse: {
distance: 200,
duration: 0.4,
},
push: {
particles_nb: 4,
},
remove: {
particles_nb: 2,
},
},
},
emitters: {
emitters: [
{
type: "gravity",
name: "gravityEmitter",
properties: {
position: {
x: 50,
y: 50,
},
acceleration: {
x: 0,
y: -0.3,
},
size: {
area: 800,
},
amount: {
max: 5,
},
},
},
{
type: "image",
name: "imageEmitter",
properties: {
position: {
x: 100,
y: 100,
},
image: {
src: "img/github.png",
width: 100,
height: 100,
},
size: {
area: 800,
},
amount: {
max: 10,
},
opacity: {
start: 0.1,
end: 0,
random: true,
},
},
},
],
},
debug: {
show: false,
},
plugins: [
"tsparticles-plugin-emitters",
],
});
</script>
</body>
</html>
Copied!
Copied!