This commit is contained in:
benfry
2011-01-26 19:22:19 +00:00
parent d3a18c7964
commit eb64b2d4fc
1234 changed files with 96518 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
/**
* Simple Particle System
* by Daniel Shiffman.
*
* Particles are generated each cycle through draw(),
* fall with gravity and fade out over time
* A ParticleSystem object manages a variable size (ArrayList)
* list of particles.
*/
ParticleSystem ps;
void setup() {
size(640, 360);
colorMode(RGB, 255, 255, 255, 100);
ps = new ParticleSystem(1,new Vector3D(width/2,height/2,0));
smooth();
}
void draw() {
background(0);
ps.run();
ps.addParticle(mouseX,mouseY);
}