Skip to content

Instantly share code, notes, and snippets.

@gerardpaapu
Created May 16, 2012 05:03
Show Gist options
  • Select an option

  • Save gerardpaapu/2707592 to your computer and use it in GitHub Desktop.

Select an option

Save gerardpaapu/2707592 to your computer and use it in GitHub Desktop.
function initParticles () {
for (var i = 0; i < 10; i++) {
particles.push(new particle());
particles[i].setValues(
Math.random() * 50, // x
Math.random() * 50, // u
Math.random() * 10, // vx
Math.random() * 10, // vy
1, // radius
"#0000FF", // color
0 // life
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment