Browse Source

simple reset cause you don't want to poke in the internals

michaud 13 years ago
parent
commit
eea4cc6cc7
1 changed files with 5 additions and 0 deletions
  1. 5 0
      src/renderers/WebGLRenderer.js

+ 5 - 0
src/renderers/WebGLRenderer.js

@@ -215,6 +215,11 @@ THREE.WebGLRenderer = function ( parameters ) {
 		_gl.viewport( _viewportX, _viewportY, _viewportWidth, _viewportHeight );
 		_gl.viewport( _viewportX, _viewportY, _viewportWidth, _viewportHeight );
 
 
 	};
 	};
+	
+	//reset the viewport to the current canvas size
+	this.resetViewport = function () {
+		this.setViewport( 0, 0, _canvas.width, _canvas.height );
+	}
 
 
 	this.setScissor = function ( x, y, width, height ) {
 	this.setScissor = function ( x, y, width, height ) {