Ver Fonte

WebGLRenderer3: Fixed hdpi support.

Mr.doob há 12 anos atrás
pai
commit
36d3cb8d93
1 ficheiros alterados com 2 adições e 2 exclusões
  1. 2 2
      examples/js/renderers/WebGLRenderer3.js

+ 2 - 2
examples/js/renderers/WebGLRenderer3.js

@@ -324,8 +324,8 @@ THREE.WebGLRenderer3 = function ( parameters ) {
 
 	this.setSize = function ( width, height, updateStyle ) {
 
-		canvas.width = width;
-		canvas.height = height;
+		canvas.width = width * devicePixelRatio;
+		canvas.height = height * devicePixelRatio;
 
 		if ( devicePixelRatio !== 1 && updateStyle !== false ) {