Hi, I’m having difficulty resizing a canvas while using instance mode on mobile view. It looks like the final width it lands on is 3x’s the starting width. I’ve included relevant code below (view full published code here)
var sketch1 = function(o) {
o.setup = function(){
let cnv = o.createCanvas(o.windowWidth,150);
cnv.parent('output');
cnv.style('z-index','2');
cnv.style('display','block');
cnv.background(224, 174, 224, .0);
o.textFont("Righteous",36);
o.textStyle(o.BOLD);
o.textAlign (o.RIGHT, o.CENTER);
o.fill('#DAF7A6');
o.noLoop();
}
o.windowResized = function(){
o.resizeCanvas(o.windowWidth,150);
}
o.draw = function (){
o.background('#E0AEE0');
let randomwords = o.random(words);
o.text(randomwords,(o.windowWidth/2),75);
}
}