Skip to content

Commit

Permalink
Delete night sky, add color drop.
Browse files Browse the repository at this point in the history
  • Loading branch information
cibomahto committed Aug 28, 2012
1 parent 74e683c commit f61de0e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 93 deletions.
42 changes: 42 additions & 0 deletions ColorDrop.pde
@@ -0,0 +1,42 @@
class ColorDrop extends Routine {
void draw() {
background(0);

float frame_mult = 3; // speed adjustment

long frame = frameCount - modeFrameStart;

for(int row = 0; row < height; row++) {
float phase = sin((float)((row+frame*frame_mult)%height)/height*3.146);

float r = 0;
float g = 0;
float b = 0;


if((row+frame*frame_mult)%(3*height) < height) {
r = 255*phase;
g = 0;
b = 0;
}
else if((row+frame*frame_mult)%(3*height) < height*2) {
r = 0;
g = 255*phase;
b = 0;
}
else {
r = 0;
g = 0;
b = 255*phase;
}

stroke(r,g,b);
line(0, row, width, row);
}

if (frame > FRAMERATE*TYPICAL_MODE_TIME) {
newMode();
}
}

}
93 changes: 0 additions & 93 deletions NightSky.pde

This file was deleted.

0 comments on commit f61de0e

Please sign in to comment.