Syntax of functions
...
| Code Block |
|---|
void setup()
{
size(300,300);
background(0);
}
void draw()
{}
void mousePressed()
{
println("x:" + mouseX + ", y:" + mouseY);
} |
Exercise 4
Create Write a program sketch where a unique shape follows the mouse position. When you click the mouse, the should change in some way (form, colour, size).