Skip to content

Instantly share code, notes, and snippets.

@drart
Created January 16, 2014 19:18
Show Gist options
  • Save drart/8461515 to your computer and use it in GitHub Desktop.
Save drart/8461515 to your computer and use it in GitHub Desktop.
// TITLE: Rolling
// Adam Tindale 2010
int count = 0;
import gifAnimation.*;
GifMaker gifExport;
void setup(){
gifExport = new GifMaker(this, "blackorwhite.gif");
gifExport.setRepeat(0);
frameRate(5);
noStroke();
}
void draw(){
background(0);
rect(((count-10)/10.0) * width,0, width, height);
gifExport.setDelay(5);
gifExport.addFrame();
if (count == 19){
gifExport.finish();
exit();
}
count = ++count % 20;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment