Skip to content

Commit

Permalink
Merge pull request #6480 from Gaurav-1306/resize
Browse files Browse the repository at this point in the history
resolved issue #6399
  • Loading branch information
davepagurek authored Oct 17, 2023
2 parents 144bf30 + 213d8fb commit 4cea5a8
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/webgl/p5.RendererGL.js
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,15 @@ p5.RendererGL = class RendererGL extends p5.Renderer {
// geometries/borders on this layer should always be invisible
this.filterGraphicsLayer.noStroke();
}

else if(
this.filterGraphicsLayer.width !== this.width ||
this.filterGraphicsLayer.height !== this.height ||
this.filterGraphicsLayer.pixelDensity() !== this._pInst.pixelDensity()
){
// Resize the graphics layer
this.filterGraphicsLayer.resizeCanvas(this.width, this.height);
this.filterGraphicsLayer.pixelDensity(this._pInst.pixelDensity());
}

let pg = this.filterGraphicsLayer;

Expand Down

0 comments on commit 4cea5a8

Please sign in to comment.