xxxxxxxxxx
66
let x = 0,
y = 0,
end = 100;
let monoFont;
function preload() {
monoFont = loadFont("terminal-grotesque-webfont.ttf");
}
function setup() {
createCanvas(400, 400);
textFont(monoFont);
textSize(28);
fill(255);
}
let time = 0;
function draw() {
drawZero();
if (time > 100) {
time = 0;
}
}
function drawZero() {
background(0);
text("0", 200, 200);
time += 2.5;
let centerX = width / 2;
let centerY = height / 2;
while (time < 200) {
if (time > 10) {
text("0", centerX, centerY - 30);
}
if (time > 20) {
text("0", 230, 170);
}
if (time > 30) {
text("0", 230, 200);
}
if (time > 40) {
text("0", 230, 230);
}
if (time > 50) {
text("0", 200, 230);
}
if (time > 60) {
text("0", 170, 230);
}
if (time > 70) {
text("0", 170, 200);
}
if (time > 80) {
text("0", 170, 170);
}
return true;
}
}