xxxxxxxxxx
17
let myCam;
function setup() {
createCanvas(400, 300);
myCam = createCapture(VIDEO);
myCam.hide();
}
function draw() {
background(220);
//for flipping your camera feed
push();
translate(width, 0); // move to top right corner
scale(-1.0, 1.0); // flip x-axis backwards
image(myCam, 0, 0, width, height);
pop();
}