sp

spark-particles

Particle library written in JavaScript

Showing:

Popularity

Downloads/wk

1

GitHub Stars

10

Maintenance

Last Commit

4mos ago

Contributors

5

Package

Dependencies

0

Size (min+gzip)

4.1KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Categories

Readme

Spark Particles

version license language issues npm downloads npm min bundle size npm minzip bundle size

Lightweight and fast Particle library written in JavaScript

Zero Dependencies!

Basic example

Installation

  1. npm i spark-particles --save
  2. Done!

Usage

See Basic example

import Particles from '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()

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

History

1.2.0 New grid structure & optimization

1.0.0 Release

License

MIT

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100
No reviews found
Be the first to rate

Alternatives

No alternatives found

Tutorials

No tutorials found
Add a tutorial