Created
September 11, 2014 02:04
-
-
Save shiffman/c824b5e2cf6202e53dde to your computer and use it in GitHub Desktop.
every N frames
This file contains 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
color c = color(0); | |
void setup() { | |
size(200, 200); | |
} | |
void draw() { | |
background(c); | |
// % is the remainder http://processing.org/reference/modulo.html | |
// This will execute every 100 frames (0, 100, 200, 300, etc.) | |
if (frameCount % 100 == 0) { | |
c = color(random(255)); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment