p5.js-editor icon indicating copy to clipboard operation
p5.js-editor copied to clipboard

Size Changes Between Runs

Open KevinWorkman opened this issue 9 years ago • 1 comments

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.

KevinWorkman avatar Jun 07 '16 13:06 KevinWorkman

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).

KevinWorkman avatar Jun 07 '16 14:06 KevinWorkman