瀏覽代碼

WebGLRenderTarget: Added .scissor and .scissorTest.

Mr.doob 9 年之前
父節點
當前提交
3179ceac0b
共有 1 個文件被更改,包括 4 次插入6 次删除
  1. 4 6
      src/renderers/WebGLRenderTarget.js

+ 4 - 6
src/renderers/WebGLRenderTarget.js

@@ -16,6 +16,9 @@ THREE.WebGLRenderTarget = function ( width, height, options ) {
 	this.width = width;
 	this.height = height;
 
+	this.scissor = new THREE.Rectangle( 0, 0, width, height );
+	this.scissorTest = false;
+
 	this.viewport = new THREE.Rectangle( 0, 0, width, height );
 
 	options = options || {};
@@ -45,12 +48,7 @@ THREE.WebGLRenderTarget.prototype = {
 		}
 
 		this.viewport.set( 0, 0, width, height );
-
-	},
-
-	setViewport: function ( x, y, width, height ) {
-
-		this.viewport.set( x, y, width, height );
+		this.scissor.set( 0, 0, width, height );
 
 	},