Skip to content

Instantly share code, notes, and snippets.

@jaycody
Created June 18, 2016 03:41
Show Gist options
  • Save jaycody/8101ae86d717bd9a55959685d9293e64 to your computer and use it in GitHub Desktop.
Save jaycody/8101ae86d717bd9a55959685d9293e64 to your computer and use it in GitHub Desktop.
record image sequence (start and stop)
void draw() {
// If we are recording call saveFrame!
if (recording) {
saveFrame("output/frames####.png");
}
}
void keyPressed() {
// If we press r, start or stop recording!
if (key == 'r' || key == 'R') {
recording = !recording;
}
}
/*
In addition, if you draw anything after saveFrame()
it won’t actually appear in the output, but will be seen on screen.
This is useful for debugging information
that you don’t want included in the render.
*/
/*
void draw() {
// Draw lots of stuff to be recorded!
if (recording) {
saveFrame("output/frames####.png");
}
// Draw our debugging stuff that won't be recorded!
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment