Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 184ca279e8
Fetching contributors…

Cannot retrieve contributors at this time

27 lines (20 sloc) 0.5 kb
class Stars extends Routine {
int NUMBER_OF_STARS = 30;
Star[] stars;
void setup(PApplet parent) {
super.setup(parent);
stars = new Star[NUMBER_OF_STARS];
for (int i=0; i<NUMBER_OF_STARS; i++) {
stars[i] = new Star(i*1.0/NUMBER_OF_STARS*ZOOM);
}
}
void draw() {
background(0);
for (int i=0; i<NUMBER_OF_STARS; i++) {
stars[i].draw();
}
if (frameCount - modeFrameStart > FRAMERATE*TYPICAL_MODE_TIME) {
newMode();
}
}
}
Jump to Line
Something went wrong with that request. Please try again.