added webcam-mode and autoplay-mode
This commit is contained in:
14
manglr2.pde
14
manglr2.pde
@@ -20,12 +20,14 @@ String frameName; //to save frame as image
|
||||
int uptime; //logs how many frames this software has rendered before (inaccurate, it's actually way, way more)
|
||||
boolean recording; //save every frame?
|
||||
int renderSize = 500; //px
|
||||
float renderFrameRate;
|
||||
String[] saveData;
|
||||
int w, h;
|
||||
|
||||
boolean spawnPlaying = true;
|
||||
|
||||
boolean videoRecord;
|
||||
boolean spawnPlaying = false;
|
||||
boolean autoPlay = false;
|
||||
boolean videoRecord = false;
|
||||
boolean webcamMode = false;
|
||||
|
||||
String[] params;
|
||||
|
||||
@@ -59,7 +61,7 @@ void setup() {
|
||||
}
|
||||
fallbackImage = loadImage(dataPath("0.png"));
|
||||
bin = loadImage(dataPath("bin.png"));
|
||||
|
||||
cam = new Capture(this, 800, 600);
|
||||
|
||||
String[] args = {"SecondFrame"};
|
||||
gui = new SecondApplet();
|
||||
@@ -74,15 +76,17 @@ void setup() {
|
||||
|
||||
void draw() {
|
||||
uptime+=1;
|
||||
renderFrameRate = frameRate;
|
||||
background(255);
|
||||
|
||||
sourceManager.update(); //will write some image to the renderer
|
||||
sourceManager.setSource();
|
||||
if (autoPlay) gui.robot();
|
||||
gui.shaderManager.applyShader(); //boolean animate (iterative calcs), boolean apply (draw)
|
||||
|
||||
background(color(0));
|
||||
viewport = renderer.get();
|
||||
|
||||
|
||||
int imgw, imgh;
|
||||
if (renderer.width < renderer.height) {
|
||||
imgh = height;
|
||||
|
||||
Reference in New Issue
Block a user