Hi everyone!! Anyone who could help me out with this? I am trying to make the trail of the white square stay over the webcam's image. How can i do that??
this is the code I have written so far....
import processing.video.*;
Capture cam;
void setup() {
size(640, 536, P2D);
cam = new Capture(this,width, height);
cam.start();
}
void draw() {
// draw grey rectrangle
stroke(255);
fill(255);
rectMode(CENTER);
rect(mouseX,mouseY,50,50);
if (cam.available() == true) {
cam.read ();
image(cam,0,0);
}
}
Thank you very much!
this is the code I have written so far....
import processing.video.*;
Capture cam;
void setup() {
size(640, 536, P2D);
cam = new Capture(this,width, height);
cam.start();
}
void draw() {
// draw grey rectrangle
stroke(255);
fill(255);
rectMode(CENTER);
rect(mouseX,mouseY,50,50);
if (cam.available() == true) {
cam.read ();
image(cam,0,0);
}
}
Thank you very much!