xxxxxxxxxx
38
let minballw = 100;
let minballh = 100;
let minMinutes = 0;
let maxMinutes = 1440;
let minSecond = 0;
let maxSecond = 60;
let minHour = 0;
let maxHour = 24;
function setup() {
createCanvas(600, 600);
}
function draw() {
background(164,243,227);
let s = second();
let m = minute();
let h = hour();
fill(255,242,168);
ellipse(mouseX,mouseY, minballw, minballh);
minballw = map(s, minSecond, maxSecond, 0, 300);
minballh = map(s, minSecond, maxSecond, 0,300);
console.log(`${h}:${m}:${s}----`);
if(s == 59){
background(0);
textSize(30);
fill(255);
text('BOOM!',mouseX ,mouseY);
}
}
// function mousePressed(){
// let s = second();
// }