Spp.js

A sample physics particle system engine for javascript.


Project maintained by flashhawk Hosted on GitHub Pages — Theme by mattgraham

Welcome Spp.js

Spp.js is a sample physics particle system engine for javascript.

Feature

Getting Started

var ps=new SPP.ParticleSystem();
var particle=ps.createParticle(SPP.Particle);
particle.life=3;
particle.position.x=50;
particle.position.y=60;
particle.addForce("someForceName",someForce);
particle.onUpdate=someUpdateHander;
particle.addEventListener("dead",deadHandler);
animate();
ps.start();

function someUpdateHander()
{
        ...
};
function deadHandler(event)
{
        ...
};

function animate()
{
       requestAnimationFrame(animate);
       ps.render();
       ...
} 

Examples

Game

Case

Support or Contact

Weibo: http://weibo.com/flashawk? or contact flashhawkmx@gmail.com and we’ll help you sort it out.