Proton Documentation

Proton is an easily customizable html5 particle engine including six different types of renderers.

Proton overview

Proton parts

Utils

all Utils are static, there is no need to create an instance

Available utils


Behaviour

Note: you can add more than just one behaviour to the emitter

Behaviours will manipulate the particles. You can add as much behaviours as you want.

Example

// this example shows how to add a specific behaviour to the Proton instance
var proton  = new Proton;
var emitter = new Proton.Emitter();
var attractionBehaviour = new.Proton.Attraction(new Proton.Vector2D())

emitter.addBehaviour(attractionBehaviour);
emitter.emit('once');
proton.addEmmiter(emitter);

Available behaviours


Particle initializations

These settings are for manipulating the particle. Giving more mass or even another radius.

Example

var emitter = new Proton.Emitter();

// add one or more
emitter.addInitialize(new Proton.Mass(1));
emitter.addInitialize(new Proton.Radius(0.4, 1));

Available initializations

Todo add documentation in ./src/initialize


Emitter

Example

Available emitter


Renderer

Example

Available renderer