-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFoilEffectz.pde
116 lines (88 loc) · 2.03 KB
/
FoilEffectz.pde
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
class FoilEffectz {
float x;
float y;
float size;
float shine;
FoilEffectz(int chance) {
switch(chance) {
case 1:
this.effect1();
break;
case 2:
this.effect2();
break;
case 3:
this.effect3();
break;
case 4:
this.effect4();
break;
case 5:
this.effect5();
break;
}
}
void effect1() {
for (int i = 0; i < 15; ++i) {
x = random(0, width);
y = random(0, height);
size = random(100, 400);
shine = random(5, 50);
fill(#35DB62, shine);
noStroke();
circle(x, y, size);
}
}
void effect2() {
for (int i = 0; i < 15; ++i) {
x = random(0, width - 100);
y = random(0, height);
size = random(100, 400);
shine = random(5, 50);
fill(#F01FED, shine);
noStroke();
rect(x, y, size, size);
}
}
void effect3(){
for (int i = 0; i < 15; ++i) {
x = random(0, width - 100);
y = random(0, height);
size = random(-300, 500);
shine = random(5, 50);
fill(#E6EA13, shine);
noStroke();
triangle(x, y, x + size, y, x + size / 2, y + size);
}
}
void effect4(){
for (int i = 0; i < 15; ++i) {
x = random(0, width - 100);
y = random(0, height);
size = random(300, 500);
float weight = random(10, 100);
shine = random(5, 50);
stroke(#DB3E43, shine);
strokeCap(ROUND);
strokeWeight(weight);
line(x, y, x + size, y - size);
}
}
void effect5(){
size = 10;
shine = 10;
for (int i = 0; i < width; i+=20) {
float r = random(100, 255);
float g = random(0, 128);
for (int u = 0; u < height; u+=20){
x = i + 10;
y = u + 10;
fill(r, g, 60, shine);
noStroke();
ellipse(x, y, size, size);
}
shine+=2;
size++;
}
}
}