p5canvas icon indicating copy to clipboard operation
p5canvas copied to clipboard

width and height return values unrelated to canvas call

Open azalea666 opened this issue 9 months ago • 0 comments

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.

azalea666 avatar May 25 '24 19:05 azalea666