The easiest way to get the library is to use npm:
npm install node-particles
Then from your scripts you can consume it using require:
var ns =
var np =var ps = ; // creates a new ParticleSystem instance// Creates an Emitter at x:188,y:158 whose particles have a x:3,y:0 speed.// Particles size is 15, ttl = -1, the position of the particle is jittered +/- 0.15// and 1 particle to be emitted on every cycle.ps;// Adds a field at x:254,y:211 with a mass of 500 (positive means attraction)ps;// Adds a field at x:443,y:411 with a -5 mass (repulsion)ps;// Run 10 cycles on the ParticleSystem. On each one the particles are generated// and the previous ones position is updated.ps;ps;
Please check the LICENSE file located at the root of this reposity.