p5.js-editor
p5.js-editor copied to clipboard
Size Changes Between Runs
Originally found in this Stack Overflow question: http://stackoverflow.com/questions/37671632/my-p5-js-canvas-window-continues-to-change-with-each-code-execution-how-can-i-s
I see the same issue on Windows 7.
If I have some simple code:
function setup() {
createCanvas(600, 400);
}
function draw() {
background(0);
ellipse(mouseX, mouseY, 25, 25);
}
The code works okay the first time I run it. I close the window, don't make any changes to the code, and run it again. Now the width will be slightly smaller, and the height will be slightly larger. This adds up over runs, so by the 10th time I'm running it, my sketch is a different size than what I'm giving it.
I found this related issue: https://github.com/processing/p5.js-editor/issues/129
That issue appears to be fixed, but I'm still seeing the problem in the latest version (0.5.10).