
Não tem graça a imagem :\
Código:
float x = 0.0;
float y = 0.0;
float atraso = 0.09;
void setup(){
size(500, 400);
smooth();
noStroke();
background(0);
frameRate(30);
}
void draw(){
if(mousePressed){
fill(229,0,0,25);}
else{
fill(255,255,255,25);}
float targetX = mouseX;
float targetY = mouseY;
x += (targetX - x) * atraso;
y += (targetY - y) * atraso;
ellipse(x,y,100,100);
}
Nenhum comentário:
Postar um comentário