Get started with tsparticles-updater-stroke-color CDN
MIT licensed
TS Particles library: updates stroke color with tsparticles-updater-stroke-color.
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-updater-stroke-color CDN
import * as TSParticles from 'tsparticles-engine';
import { updaters } from 'tsparticles-updaters';
// Set up the particles container and create the particle system
const particlesContainer = document.querySelector('#tsparticles');
const particleInit = async () => {
await TSParticles.loadLite(particlesContainer);
const particleSystem = TSParticles.init(particlesContainer, {
fpsLimit: 60,
particles: {
number: {
value: 50,
density: {
enable: true,
value_area: 800,
},
},
color: {
value: '#ffffff',
},
shape: {
type: 'circle',
},
size: {
value: 5,
random: true,
anim: {
enable: false,
speed: 4,
size_min: 0.1,
sync: false,
},
},
line_linked: {
enable: false,
distance: 150,
color: '#ffffff',
opacity: 0.4,
width: 1,
},
},
interactivity: {
detectsOn: 'canvas',
events: {
onHover: {
enable: true,
mode: 'repulse',
},
},
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,
},
},
},
updaters: [updaters.StrokeColor],
});
// Update stroke color on each particle
particleSystem.updateStrokeColor();
};
particleInit();
Copied!
Copied!