Skip to content

Instantly share code, notes, and snippets.

@brendandawes
Created February 22, 2017 12:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brendandawes/a3d42249471e4acbd8739bf8cba49dd8 to your computer and use it in GitHub Desktop.
Save brendandawes/a3d42249471e4acbd8739bf8cba49dd8 to your computer and use it in GitHub Desktop.
exporting frames for video
final int VIDEO_FRAME_RATE = 60;
final int SECONDS_TO_CAPTURE = 60;
int videoFramesCaptured = 0;
boolean recordVideo = false;
if (recordVideo){
saveFrame("export/####-video.tga");
if (videoFramesCaptured > VIDEO_FRAME_RATE * SECONDS_TO_CAPTURE){
recordVideo = false;
}
videoFramesCaptured++;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment