Browse Source

Clear the canvas before starting to draw (#27092)

Co-authored-by: Antonio Pisano <[email protected]>
Antonio Pisano 1 năm trước cách đây
mục cha
commit
bb22d64298
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  1. 2 0
      examples/jsm/interactive/HTMLMesh.js

+ 2 - 0
examples/jsm/interactive/HTMLMesh.js

@@ -501,6 +501,8 @@ function html2canvas( element ) {
 
 	// console.time( 'drawElement' );
 
+	context.clearRect(0, 0, canvas.width, canvas.height);
+
 	drawElement( element );
 
 	// console.timeEnd( 'drawElement' );