void setup()
{
size (400,400);
}
void draw()
{
beginShape();
if (mouseX < width/2)
{
vertex(mouseX, mouseY+20);
vertex(mouseX, 20);
}
else
{
vertex(mouseX/2, mouseY+20/2);
vertex(mouseX/2, 20);
}
vertex(40, 40);
vertex(60, 40);
vertex(60, 60);
vertex(20, 60);
endShape(CLOSE);
}
Hiç yorum yok:
Yorum Gönder