소스 검색

Simplified WebGLRenderer setScissor a bit more.

Mr.doob 11 년 전
부모
커밋
2d644178f5
1개의 변경된 파일6개의 추가작업 그리고 7개의 파일을 삭제
  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
+		);
 
 	};