xxxxxxxxxx
24
var myParticles = [];
function setup() {
// background(220);
createCanvas(400, 400);
}
function mousePressed(){
var tempParticle = new Particle(mouseX, mouseY);
myParticles.push(tempParticle);
// println(myParticles.length);
}
function draw() {
background(0);
for (var i = 0; i < myParticles.length; i++){
myParticles[i].move();
myParticles[i].display();
}
// if (myParticles.length > 0) println(myParticles[0].x);
}