test.jslet capture;
function setup() {
createCanvas(0, 0);
capture = createCapture(VIDEO);
capture.size(640, 480);
//capture.hide();
}
function draw() {
//background(255);
//image(capture, 0, 0, 320, 240);
//filter(INVERT);
}
sketch.jsconst sketch = p => {
let capture;
p.setup = () => {
p.createCanvas(0,0);
capture = p.createCapture(p.VIDEO);
capture.size(320, 240);
}
p.draw = () => {
}
}
new p5(sketch, `L${scrapbox.Page.lines[20].id}`);
//new p5(sketch, 'editor');