pixelkind / p5canvas

An interactive preview for writing p5js code in Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=garrit.p5canvas
Other
39 stars 4 forks source link

createCanvas() note working properly #55

Closed berkmtb closed 1 year ago

berkmtb commented 2 years ago

The displayed canvas size is not matching the value set in createCanvas(). For example, if I set createCanvas(200,200), console.log(width) shows 819 and console.log(height) shows 858. Any ideas? Fyi, I installed version 1.7.0 via the VS Code marketplace. Thanks in advance for taking a look. Here's some sample code:

function setup() { createCanvas(200, 200); console.log(width); console.log(height); }

pixelkind commented 2 years ago

Hej @berkmtb,

Sorry for my delayed answer. This is a bug and I already have an idea how to fix it. Thanks for letting me know.