-
Notifications
You must be signed in to change notification settings - Fork 0
/
yassine_README.pde
95 lines (83 loc) · 2.71 KB
/
yassine_README.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
// IMPORTANT: This code is licensed under the MIT License.
// Please see the LICENSE.txt file for details.
// If you use or modify this code, remember to include the
// copyright notice and license information in your project.
// Thank you for respecting the open-source community!
// Yassine Mazhare
// *************************************************************
String[][] strs = new String[5][2];
PFont font;
int i = 0;
boolean delete = false;
int s = 0;
int offset = 50;
int mainFontSize = 60;
int secondaryFontSize = 40;
void setup() {
size(1366, 768);
font = createFont("HelveticaNeue", 48);
textFont(font);
frameRate(30);
textAlign(CENTER);
textSize(40);
background(255);
fill(0);
strs[0][0] = "Greetings!";
strs[0][1] = "I'm Yassine Mazhare, a future Mobile App developer.";
strs[1][0] = "On a journey of continuous learning,";
strs[1][1] = "I'm delving into new frameworks and technologies.";
strs[2][0] = "Explore my GitHub repositories, ";
strs[2][1] = "where you can discover more about my coding projects.";
strs[3][0] = "Feel free to connect with me.";
strs[3][1] = "Let's explore the possibilities of coding together.";
strs[4][0] = "Stay curious, keep coding!";
strs[4][1] = "The adventure has just begun!";
}
void draw() {
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(2500);
}
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++;
}
}
}
}