Skip to content

Commit

Permalink
fix: 🐛 fix resizeCanvas
Browse files Browse the repository at this point in the history
fix for #832
  • Loading branch information
thkruz committed Dec 18, 2023
1 parent 818d773 commit ea2a4f0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/singletons/webgl-renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,8 @@ export class WebGLRenderer {

resizeCanvas(isForcedResize: boolean = false) {
const gl = this.gl;
if (!gl.canvas) return; // Avoids errors when the canvas is not available

const { vw, vh } = WebGLRenderer.getCanvasInfo();

// If taking a screenshot then resize no matter what to get high resolution
Expand Down

0 comments on commit ea2a4f0

Please sign in to comment.