I'm playing around with using p5 and tensorflow. I created a "face-filter", that tracks the nose and ears with tensorflow, and append images to those locations. For instance if my face-filter is "clown', the nose will have a red nose, and the ears will have clown ears.
Everything works, but now I'm trying trying to make the canvas responsive.
My canvas dimensions are createCanvas(1200, 768), and it's centered in css.
How can I make the canvas responsive based on browser width? I'm just not sure how to setup the code in the windowResized function.
function windowResized(){
resizeCanvas(width?, height?);
}
Appreciate any input I could get.