PROCESSING | Sketch Interactivo 2
float r;
float g;
float b;
float a;
float diam;
float x;
float y;
void setup() {
size(500, 500);
background(255);
}
void draw() {
r = random(255);
g = random(255);
b = random(255);
a = random(255);
diam = random(20);
x = random(width);
y = random(height);
noStroke();
fill(0, g, b, a);
ellipse(x, y, diam, diam);
if(mousePressed){
fill(r, 0, b, a);
ellipse(random(mouseX-40, mouseX), random(mouseY-40,mouseY), diam, diam);
}
}
Suscribirse a:
Enviar comentarios (Atom)


0 comentarios:
Publicar un comentario