xxxxxxxxxx
var capture;
var height;
function setup() {
height = windowHeight * 0.8;
createCanvas(height * 1.33, height);
capture = createCapture(VIDEO);
capture.size(width, height);
capture.hide();
}
function draw() {
col = capture.get(width/2, height/2);
background(col);
loadPixels();
image(capture, 0, 0, width, height);
}
function mousePressed() {
filter('INVERT');
}