Lightweight and fast Particle library written in JavaScript
Zero Dependencies!
npm i advanced-spark-particles --save
- Done!
See Basic example
import Particles from 'advanced-spark-particles'
const canvas = document.getElementById('particles')
const settings = {
debug: false, // boolean
resize: true, // boolean
particles: {
amount: 250, // number
moveDirection: 'random', // 'random' | 'top' | 'right' | 'bottom' | 'left'
distanceToLink: 150, // number
linkedParticles: true, // boolean
maxVelocity: 0.8, // number
maxRadius: 4, // number
},
renderer: {
transparentBackground: false, // boolean
backgroundColor: '#186cb6', // color
linearGradient: {
x1: 0, // number
y1: 0, // number
x2: 1, // number
y2: 1, // number
color1: '#327fc2', // color
color2: '#014987', // color
},
width: window.innerWidth, // number
height: window.innerHeight, // number
},
}
new Particles(canvas).init(settings).start()
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
1.2.0 New grid structure & optimization
1.0.0 Release
MIT