forked from mhenstell/acw
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Chase.pde
23 lines (19 loc) · 1.01 KB
/
Chase.pde
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
class Chase extends Routine {
void draw() {
draw.background(0);
long frame = frameCount - modeFrameStart;
draw.stroke(red(primaryColor)*0.5,green(primaryColor)*0.5,blue(primaryColor)*0.5);
draw.line(frame/3.0%Config.WIDTH, 0, frame/3.0%Config.WIDTH, Config.HEIGHT);
draw.stroke(red(primaryColor)*0.6,green(primaryColor)*0.6,blue(primaryColor)*0.6);
draw.line((frame/3.0+1)%Config.WIDTH, 0, ((frame/3.0+1))%Config.WIDTH, Config.HEIGHT);
draw.stroke(red(primaryColor)*0.7,green(primaryColor)*0.7,blue(primaryColor)*0.7);
draw.line((frame/3.0+2)%Config.WIDTH, 0, ((frame/3.0+2))%Config.WIDTH, Config.HEIGHT);
draw.stroke(red(primaryColor)*0.8,green(primaryColor)*0.8,blue(primaryColor)*0.8);
draw.line((frame/3.0+3)%Config.WIDTH, 0, ((frame/3.0+3))%Config.WIDTH, Config.HEIGHT);
draw.stroke(primaryColor);
draw.line((frame/3.0+4)%Config.WIDTH, 0, ((frame/3.0+4))%Config.WIDTH, Config.HEIGHT);
if (frame >Config.FRAMERATE*Config.MODE_TIMEOUT) {
newMode();
}
}
}