-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFireWorks.pde
More file actions
39 lines (33 loc) · 793 Bytes
/
Copy pathFireWorks.pde
File metadata and controls
39 lines (33 loc) · 793 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
38
39
ArrayList<Firework> fireworks;
PVector gravity = new PVector(0, 0.2);
float textAlpha = 0;
void setup() {
size(1200, 700, P2D);
fireworks = new ArrayList<Firework>();
colorMode(HSB, 360, 100, 100);
background(51);
textAlign(CENTER);
textSize(32);
}
void draw() {
if (random(1) < 0.08) {
fireworks.add(new Firework());
}
fill(51, 50);
noStroke();
rect(0, 0, width, height);
for (int i = fireworks.size() - 1; i >= 0; i--) {
Firework f = fireworks.get(i);
f.run();
if (f.done()) {
fireworks.remove(i);
}
}
if (textAlpha < 255) {
textAlpha += 2;
}
fill(120, 255, 255, textAlpha);
text("HRSD", width / 2.3, height / 2);
fill(255, textAlpha);
text("Eid Mubark From HRSD Member Shatha Alhakami <3", width / 2, height / 2);
}