Browse Source

Simplified WebGLRenderer setScissor a bit more.

Mr.doob 11 years ago
parent
commit
2d644178f5
1 changed files with 6 additions and 7 deletions
  1. 6 7
      src/renderers/WebGLRenderer.js

+ 6 - 7
src/renderers/WebGLRenderer.js

@@ -321,13 +321,12 @@ THREE.WebGLRenderer = function ( parameters ) {
 
 	this.setScissor = function ( x, y, width, height ) {
 
-		var sX = x * this.devicePixelRatio;
-		var sY = y * this.devicePixelRatio;
-
-		var sW = width * this.devicePixelRatio;
-		var sH = height * this.devicePixelRatio;
-
-		_gl.scissor( sX, sY, sW, sH );
+		_gl.scissor(
+			x * this.devicePixelRatio,
+			y * this.devicePixelRatio,
+			width * this.devicePixelRatio,
+			height * this.devicePixelRatio
+		);
 
 	};