xxxxxxxxxx
35
let name;
let font;
let counter = 0;
function preload(){
font = loadFont("IndieFlower.ttf");
}
function setup() {
createCanvas(400, 400);
textSize(100);
textFont(font);
frameRate(25);
textAlign(CENTER, CENTER);
}
function draw() {
counter = second();
// int(millis() / 1000);
counter = counter % 10;
if (counter == 9){
background(220, 0, 0);
} else {
background(200);
}
//name = int(millis()) + "";
name = counter + "";
let w = textWidth(name);
let h = textSize();
ellipse(width / 2, height / 2, w, h);
text(name, width / 2, height / 2);
}