Get started with tsparticles-plugin-polygon-mask CDN
MIT licensed
TS Particles polygon-mask plugin creates custom particle shapes via polygon masks in 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-plugin-polygon-mask CDN
<!DOCTYPE html>
<html>
<head>
<title>Get started with tsparticles-plugin-polygon-mask CDN - cdnhub.io</title>
<style>
#tsparticles {
height: 100vh;
width: 100%;
}
</style>
</head>
<body>
<div id="tsparticles"></div>
<script src="https://cdn.jsdelivr.net/npm/tsparticles@0.13.2/dist/tsparticles.min.js"></script>
<script src="https://cdn.cdnhub.io/tsparticles-plugin-polygon-mask/2.12.0/tsparticles.plugin.polygon-mask.min.js"></script>
<script>
const particlesInit = async () => {
const particlesContainer = document.querySelector("#tsparticles");
await tsparticles.load(particlesContainer, {
background: {
color: "#000",
},
fpsLimit: 60,
interactivity: {
events: {
onClick: {
enable: true,
mode: "repulse",
},
onHover: {
enable: true,
mode: "grab",
},
resize: true,
},
modes: {
grab: {
distance: 100,
linkHandlers: 1,
},
repulse: {
distance: 200,
duration: 0.4,
},
},
},
particles: {
color: {
value: "#ffffff",
},
link: {
color: "#ffffff",
opacity: 0.5,
},
collisions: {
enable: true,
type: "circle",
radius: 5,
force: 0.4,
opacityChange: {
enable: true,
speed: 0.1,
amount: 0.1,
},
},
move: {
direction: "none",
enable: true,
outModes: {
default: "bounce",
bottom: "bounce",
left: "bounce",
right: "bounce",
top: "bounce",
},
random: false,
speed: 1,
straight: false,
},
number: {
density: {
enable: true,
value_area: 800,
},
value: 100,
},
opacity: {
value: 0.5,
random: true,
anim: {
enable: false,
speed: 1,
opacity_min: 0.1,
sync: false,
},
},
size: {
value: 5,
random: true,
anim: {
enable: false,
speed: 4,
size_min: 0.1,
sync: false,
},
},
lineLinked: {
enable: true,
distance: 150,
colorOverrides: {
"300": "ffffff",
"500": "ffffff",
"700": "ffffff",
"900": "ffffff",
},
opacityOverrides: {
"300": 0.5,
"500": 0.5,
"700": 0.5,
"900": 0.5,
},
widthOverrides: {
"300": 1,
"500": 1,
"700": 1,
"900": 1,
},
},
shape: {
type: "circle",
polygon: {
enable: false,
npoints: 5,
},
images: [],
},
},
polygon: {
enable: true,
points: [
{ x: 50, y: 50 },
{ x: 100, y: 50 },
{ x: 150, y: 100 },
{ x: 150, y: 200 },
{ x: 100, y: 250 },
{ x: 50, y: 250 },
{ x: 0, y: 200 },
{ x: 0, y: 100 },
{ x: 50, y: 50 },
],
rotate: {
x: 0,
y: 0,
z: 0,
},
translate: {
x: 0,
y: 0,
z: 0,
},
scale: {
x: 1,
y: 1,
z: 1,
},
opacity: {
value: 0.5,
random: true,
anim: {
enable: false,
speed: 1,
opacity_min: 0.1,
sync: false,
},
},
blendMode: {
mode: "normal",
srcColorBlendMode: "normal",
destColorBlendMode: "normal",
srcAlphaBlendMode: "normal",
destAlphaBlendMode: "normal",
operation: "normal",
},
},
});
};
particlesInit();
</script>
</body>
</html>
Copied!
Copied!