You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Well, I'm not sure if this is a bug but It is surely an issue and I couldn't find anything specific about that.
If I resize the window, anything that was drawn disappears.
A small example here:
function setup() {
canv = createCanvas(windowWidth, windowHeight);
canv.position(0, 0);
stroke(255, 0, 0);
}
function windowResized() {
resizeCanvas(windowWidth, windowHeight);
}
function draw() {
if (mouseIsPressed){
ellipse(0, 0, 100, 100);
}
}
The text was updated successfully, but these errors were encountered:
Yeah, unfortunately this is a limitation of the underlying HTML5 Canvas. Whenever it is resized, all content is erased. The workaround I suppose would be to save an array of all mouse coordinates as the mouse is pressed, and redraw them when the window is resized.
Well, I'm not sure if this is a bug but It is surely an issue and I couldn't find anything specific about that.
If I resize the window, anything that was drawn disappears.
A small example here:
The text was updated successfully, but these errors were encountered: