-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathSupernova.pde
More file actions
37 lines (31 loc) · 798 Bytes
/
Supernova.pde
File metadata and controls
37 lines (31 loc) · 798 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
32
33
34
35
36
37
class Supernova extends Effect{
float w, h;
float x, y;
Supernova(int _millis){
super(_millis);
w = 0;
h = 0;
x = cols/2;
y = rows/2;
imageBuffer.beginDraw();
imageBuffer.rectMode(CENTER);
imageBuffer.noFill();
imageBuffer.endDraw();
imageBuffer.beginDraw();
imageBuffer.stroke(random(155,255),random(155,255),random(155,255));
imageBuffer.background(0,0);
imageBuffer.rect(x,y,w,h);
imageBuffer.ellipse(x,y,w,h);
imageBuffer.endDraw();
}
void update(){
imageBuffer.beginDraw();
imageBuffer.stroke(random(5,255),random(155,255),random(5,255));
imageBuffer.background(0,0);
imageBuffer.rect(x,y,w,h);
imageBuffer.ellipse(x,y,w,h);
imageBuffer.endDraw();
w++;
h++;
}
}