Skip to content

Commit

Permalink
fix(WebGlRenderer): Clear domtarget canvas before drawing a new image…
Browse files Browse the repository at this point in the history
… to it
  • Loading branch information
jespertheend committed Sep 24, 2024
1 parent c0e29e0 commit b5f057a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/rendering/renderers/webGl/WebGlRendererDomTarget.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export class WebGlRendererDomTarget extends RendererDomTarget {
* @param {HTMLCanvasElement} canvas
*/
drawImage(canvas) {
this.#ctx.clearRect(0, 0, this.#canvas.width, this.#canvas.height);
this.#ctx.drawImage(canvas, 0, 0);
}
}

0 comments on commit b5f057a

Please sign in to comment.