Skip to content

Instantly share code, notes, and snippets.

@atomize
Created March 9, 2012 20:58
Show Gist options
  • Save atomize/2008668 to your computer and use it in GitHub Desktop.
Save atomize/2008668 to your computer and use it in GitHub Desktop.
Processing saveFrame -- watch out... saves a TIFF everytime draw() runs if you run this as is!
color[] cols = new color[2];
int c = 0;
void setup() {
size(100, 100);
cols[0] = color(255, 0, 0);
cols[1] = color(0, 0, 255);
}
void draw() {
background(cols[c]);
c = 1 - c;
saveFrame();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment