-
Notifications
You must be signed in to change notification settings - Fork 0
/
MNF_jamming.pde
66 lines (52 loc) · 1.33 KB
/
MNF_jamming.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
//1.Create Line's object per line
Line Fin;
Line DeuxMillesVingt;
PFont MNF;
PFont MNF_Dot;
void setup() {
MNF = loadFont("ManifontGroteskBook-70.vlw");
MNF_Dot = loadFont("ManifontGroteskBookDot-70.vlw");
//2.Size your canvas
size(350, 450);
}
void draw() {
background(255);
//3.Choose the framerate of your animation -> if this is just an image move it all to setup loop
frameRate(30);
fill(0);
textFont(MNF, 70);
//4.Call your Lines with your "text" + y position
text("YES!", 100, 370);
Fin = new Line(" FIN", 130);
DeuxMillesVingt = new Line("2020,", 250);
}
class Line {
String txt;
int lineH;
int iteration;
int lineColor;
Line(String txt, int lineH) {
this.txt=txt;
this.lineH=lineH;
fill(0);
textFont(MNF, 70);
text(txt, 100, lineH);
//5.Choose the number of iteration per color
jamming(5, 0);
jamming(50, 255);
}
void jamming(int iteration, int lineColor) {
for ( int j=0; j<iteration; j=j+1) {
pushMatrix();
for (int i=0; i<txt.length(); i=i+1) {
char x = txt.charAt(i);
//6.At least choose the range of movement in which point typography will randomly move
translate(random(30, 50), random(-10, 10));
textFont(MNF_Dot, 70);
fill(lineColor);
text(x, 50, lineH);
}
popMatrix();
}
}
}