forked from MasonSlover/MasonSlover
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgithub_README.pde
More file actions
92 lines (79 loc) · 2.39 KB
/
Copy pathgithub_README.pde
File metadata and controls
92 lines (79 loc) · 2.39 KB
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
String[][] strs = new String[6][2];
PFont font;
void setup() {
size(1920, 1080);
font = createFont("HelveticaNeue-48.vlw", 48);
textFont(font);
frameRate(30);
textAlign(CENTER);
textSize(40);
background(255);
fill(0);
strs[0][0] = "Hey there!";
strs[0][1] = "My name is Mason Slover.";
strs[1][0] = "I'm a Mathematics & Computer Science Major";
strs[1][1] = "at Fordham University at Lincoln Center in New York City.";
strs[2][0] = "I've been teaching myself how to code for 6 years!";
strs[2][1] = "I am fluent in Java, C++, Python, Swift, JavaScript, and HTML & CSS.";
strs[3][0] = "I've created apps, websites, and art using what I've learned.";
strs[3][1] = "You can even find the Processing source code for this below!";
strs[5][0] = "Feel free to reach out to say hi!";
strs[5][1] = "phone: (512) 739-2405 | email: masonslover@gmail.com";
}
int i = 0;
boolean delete = false;
int s = 0;
int offset = 50;
int mainFontSize = 60;
int secondaryFontSize = 40;
void draw() {
background(255);
if (s < strs.length) {
if ((strs[s][0].length() >= i || strs[s][1].length() >= i) && !delete) {
if (strs[s][0].length() >= i) {
textSize(mainFontSize);
text(strs[s][0].substring(0, i), width/2, height/2 - offset);
} else {
textSize(mainFontSize);
text(strs[s][0], width/2, height/2 - offset);
}
if (strs[s][1].length() >= i) {
textSize(secondaryFontSize);
text(strs[s][1].substring(0, i), width/2, height/2 + offset);
} else {
textSize(secondaryFontSize);
text(strs[s][1], width/2, height/2 + offset);
}
i++;
} else {
if (!delete) {
delay(1500);
}
delete = true;
}
if (delete) {
if (i > 0) {
if (i < strs[s][0].length()) {
textSize(mainFontSize);
text(strs[s][0].substring(0, i - 1), width/2, height/2 - offset);
} else {
textSize(mainFontSize);
text(strs[s][0], width/2, height/2 - offset);
}
if (i < strs[s][1].length()) {
textSize(secondaryFontSize);
text(strs[s][1].substring(0, i - 1), width/2, height/2 + offset);
} else {
textSize(secondaryFontSize);
text(strs[s][1], width/2, height/2 + offset);
}
i--;
} else {
delete = false;
s++;
}
}
//print(i + " ");
//s++;
}
}