ELLIPSE
int x=50;
int y=50;
void setup() {
size(500,500);
background(55,155, 235);
}
void draw() {
fill(233,122,43);
rect(x, y, 150,150);
stroke(233,122,134);
fill(76,43,123);
ellipse(x,y,100,100);
stroke(76,45,65);
if(keyPressed){
if(key=='w'||key=='W'){
y--;
} else if(key=='s'||key=='S'){
y++;
} else if(key=='a'||key=='A'){
x--;
} else if(key=='d'||key=='D'){
x++;
}
}
}
void mousePressed(){
rect(x, y, 150,150);
fill(132,73,213);
ellipse(x,y,100,100);
fill(233,122,43);
}
void mouseReleased() {
rect(x, y, 150,150);
fill(76,43,123);
ellipse(x,y,100,100);
fill(233,122,43);
}
jueves, 8 de febrero de 2018
elipse processing
1:47
No comments
0 comentarios:
Publicar un comentario