Skip to content

Instantly share code, notes, and snippets.

@federico-pepe
Last active September 30, 2015 14:46
Show Gist options
  • Select an option

  • Save federico-pepe/8eaca57f7161cf6076b4 to your computer and use it in GitHub Desktop.

Select an option

Save federico-pepe/8eaca57f7161cf6076b4 to your computer and use it in GitHub Desktop.
Controlli condizionali: esempio 1
/*
* Controlli condizionali: if, else if, else
* by Federico Pepe
* http://blog.federicopepe.com
*/
void setup() {
size(500, 500);
stroke(255);
}
void draw() {
if(mouseX > width/2) {
background(0);
} else {
background(127);
}
line(width/2, 0, width/2, height);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment