Created
June 18, 2016 03:41
-
-
Save jaycody/8101ae86d717bd9a55959685d9293e64 to your computer and use it in GitHub Desktop.
record image sequence (start and stop)
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
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