Last active
October 15, 2015 15:07
-
-
Save jonesfish/13d6894dc66a040ed112 to your computer and use it in GitHub Desktop.
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
| void setup(){ | |
| size(400,300); | |
| colorMode(HSB); | |
| } | |
| // repeat all the time --> refresh the screen continuously | |
| void draw(){ | |
| background(0); | |
| float spacing = 20; | |
| for (float x=0; x < mouseX; x+=spacing){ | |
| float hue = x/width * 255; | |
| noStroke(); | |
| fill(hue, 255, 255); | |
| rect(x,0,spacing,height); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment