p5canvas
p5canvas copied to clipboard
width and height return values unrelated to canvas call
the width and height global variables from P5JS return values unrelated to the canvas call. they vary depending on the size of the window tab but they should give the dimensions of the canvas.
function setup() {
createCanvas(400, 400);
print(width + "," + height);
}
function draw() {
background(220);
}
performs correctly in the Web Editor, but not in the extension.
this explains the bug report #71.