codigos con fotos.
PImage img;
float speed =2.5;
int diameter =20;
float x;
float y;
void setup(){
size(240,120);
img =loadImage("s.jpg");
smooth();
x=width/2;
y=height/2;
}
void draw(){
image(img,0,0,240,120);
//background(204);
x += random(-speed,speed);
y += random (-speed,speed);
translate(mouseX,mouseY);
ellipse (x,y,diameter,diameter);
}
No hay comentarios:
Publicar un comentario