Just use it in THREE.js Look at code example:
scene.add(new THREE.Particles({
size:10,
count: 100,
position: new THREE.Vector3(0,0,0),
program:function(ctx){
ctx.fillRect(0, 0, 10, 10);
},
sparksInit: function(emitter, SPARKS){
var sphereCap = new SPARKS.SphereCapZone(0, 0, 0, 0, 0, 10);
emitter.addInitializer(new SPARKS.Lifetime(0,2));
emitter.addInitializer(new SPARKS.Velocity(sphereCap));
emitter.addAction(new SPARKS.Age());
emitter.addAction(new SPARKS.Move());
emitter.addAction(new SPARKS.Accelerate(0.2));
},
position: new THREE.Vector3(10,10,10)
})
);
You can view online demo here http://elephanter.github.io/sparks.js
Sparks.js is a library to help create 3D particles in Javascript.
Its simple, fast and fun to play with.
This is an ongoing project, so check out issue tracker, the wiki, the code and examples inside github.
Sparks.js welcomes feature and pull requests, so don't be shy to fork away!
It uses three.js for Vector classes and rendering and uses ease functions from tween.js.
####Demos Online####
####Examples Online####
####Articles####
####Upcoming features####
- Text Particles
- ShotCounter