Last active
September 30, 2015 14:46
-
-
Save federico-pepe/8eaca57f7161cf6076b4 to your computer and use it in GitHub Desktop.
Controlli condizionali: esempio 1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * 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