xxxxxxxxxx
void setup()
{
size(600,600);
background(255);
frameRate(5);
}
void draw()
{
int m=millis();
if (m >5000) {
background(255);
escena1();
}
else if (m < 10000) {
background(255);
escena2();
}
else {
background(255);
fill(0);
textSize (150);
text("Fin",190,300);
}
}
void escena1()
{
float ancho = random(300);
fill(random(255), random(255), random(255));
noStroke();
ellipse(random(600), random(600), ancho, ancho);
}
void escena2()
{
float ancho = random(300);
fill(random(255), random(255), random(255));
noStroke();
rect(random(600), random(600), ancho, ancho);
}