Skip to content

Commit

Permalink
fixed offscreen toBlob (#4754)
Browse files Browse the repository at this point in the history
  • Loading branch information
elalish authored Apr 16, 2024
1 parent 7263a43 commit f9a06ea
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/model-viewer/src/three-components/Renderer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,9 @@ export class Renderer extends
}

displayCanvas(scene: ModelScene): HTMLCanvasElement {
return this.multipleScenesVisible ? scene.element[$canvas] : this.canvas3D;
return scene.element.modelIsVisible && !this.multipleScenesVisible ?
this.canvas3D :
scene.element[$canvas];
}

/**
Expand Down

0 comments on commit f9a06ea

Please sign in to comment.