Browse Source

HTMLMesh: Remove the +0.5 offset for image (#25930)

Vincent Fretin 2 years ago
parent
commit
8be4325d6d
1 changed files with 2 additions and 2 deletions
  1. 2 2
      examples/jsm/interactive/HTMLMesh.js

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

@@ -281,8 +281,8 @@ function html2canvas( element ) {
 
 
 			x = rect.left - offset.left - 0.5;
 			x = rect.left - offset.left - 0.5;
 			y = rect.top - offset.top - 0.5;
 			y = rect.top - offset.top - 0.5;
-			width = rect.width + 0.5;
-			height = rect.height + 0.5;
+			width = rect.width;
+			height = rect.height;
 
 
 			context.drawImage( element, x, y, width, height );
 			context.drawImage( element, x, y, width, height );