-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathWipe.pde
More file actions
31 lines (28 loc) · 671 Bytes
/
Wipe.pde
File metadata and controls
31 lines (28 loc) · 671 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
class Wipe extends Effect {
color baseColor;
int xpos;
float weight = 1;
Wipe(int _millis, color _c) {
super(_millis);
xpos = 0;
baseColor = _c;
imageBuffer.beginDraw();
imageBuffer.noFill();
imageBuffer.stroke(baseColor);
imageBuffer.strokeWeight(weight);
imageBuffer.endDraw();
}
void update() {
imageBuffer.beginDraw();
imageBuffer.background(0, 1);
imageBuffer.line(xpos, 0, xpos, rows);
imageBuffer.endDraw();
xpos++;
}
boolean finished(){
if(xpos>cols){
return true;
}
return false;
}
}