-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.pde
More file actions
67 lines (49 loc) · 2.01 KB
/
template.pde
File metadata and controls
67 lines (49 loc) · 2.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
//========================================================================================================================
// Day X, Word : Description
//========================================================================================================================
// Imports.
import com.hamoid.*;
//========================================================================================================================
// Template globals.
int WINDOW_SIZE = 600;
String WINDOW_TITLE = "Day X: \"\"";
String FILE_TITLE = "DayXXWord.mp4";
VideoExport video_handle;
boolean video_toggle = false;
//========================================================================================================================
// Sketch globals.
//========================================================================================================================
// Classes.
//========================================================================================================================
// Describe the sketch.
void settings() {
size(WINDOW_SIZE, WINDOW_SIZE);
}
//========================================================================================================================
// One time sketch setup.
void setup() {
surface.setTitle(WINDOW_TITLE);
background(255);
noStroke();
video_handle = new VideoExport(this, FILE_TITLE);
}
//========================================================================================================================
// Draw loop per frame.
void draw() {
background(255);
if (video_toggle) {
video_handle.saveFrame();
}
}
//========================================================================================================================
// Finish with the sketch.
void mousePressed() {
if (!video_toggle) {
video_handle.startMovie();
video_toggle = true;
} else {
video_handle.endMovie();
exit();
}
}
//========================================================================================================================