Proton is an easily customizable html5 particle engine including six different types of renderers.
npm install proton-js> See the detailed documentation please visit here
Proton is a lightweight and powerful javascript particle engine. With it you can easily create countless cool effects.
#### Check out examples at: http://a-jie.github.io/Proton/
#### Install using npm

`` `
npm install proton-js --save
...
import Proton from 'proton-js';
#### OR include in html
` `
javascript
var proton = new Proton();
var emitter = new Proton.Emitter();//set Rate
emitter.rate = new Proton.Rate(Proton.getSpan(10, 20), 0.1);
//add Initialize
emitter.addInitialize(new Proton.Radius(1, 12));
emitter.addInitialize(new Proton.Life(2, 4));
emitter.addInitialize(new Proton.Velocity(3, Proton.getSpan(0, 360), 'polar'));
//add Behaviour
emitter.addBehaviour(new Proton.Color('ff0000', 'random'));
emitter.addBehaviour(new Proton.Alpha(1, 0));
//set emitter position
emitter.p.x = canvas.width / 2;
emitter.p.y = canvas.height / 2;
emitter.emit(5);
//add emitter to the proton
proton.addEmitter(emitter);
// add canvas renderer
var renderer = new Proton.CanvasRenderer(canvas);
proton.addRenderer(renderer);
//use Euler integration calculation is more accurate (default false)
Proton.USE_CLOCK = false or true;
`Description
Proton.Span (or Proton.getSpan) is a very important concept of the Proton engine, it's everywhere. If you understand its usage, you can create almost any desired effect!
Proton has now been upgraded to the __v3__ version. Performance has been greatly improved and api also has some improvements. For more details, please check here.
Building
Node is a dependency, use terminal to install it with: `javascript
git clone git://github.com/a-jie/Proton.git
...
npm install
npm run build
` and run example
`javascript
npm start
//vist http://localhost:3001/example/
``