xxxxxxxxxx
51
// Project by Abhinav Mishra
var t = [];
function setup()
{
let canvas = createCanvas(400, 400);
}
function draw()
{
background('black');
fill(255);
fill(0);
noStroke();
fill(255);
ellipse(200, 200, 300, 300);
fill('#FF002E');
arc(200, 200, 300, 300, 1.5 * PI, ((hour()%12)/6 * PI-HALF_PI+0.0001));
fill(0);
ellipse(200, 200, 250, 250);
fill(255);
ellipse(200, 200, 200, 200);
fill('#45F715');
arc(200, 200, 200, 200, 1.5 * PI, (minute()/30 * PI-HALF_PI + 0.0001));
fill(0);
ellipse(200, 200, 150, 150);
fill(255);
ellipse(200, 200, 100, 100);
fill('#15D1F7');
arc(200, 200, 100, 100, 1.5 * PI, (second()/30 * PI-HALF_PI + 0.0001));
fill(0);
ellipse(200,200,50,50);
fill(255);
textAlign(RIGHT);
text(hour() % 12, 184.6, 380);
text(":", 190, 380);
textAlign(CENTER);
text(minute(), 200, 380);
text(":",210,380);
textAlign(LEFT);
text(second(), 213.5, 380);
}