|
@@ -222,20 +222,15 @@ THREE.WebGLRenderer = function ( parameters ) {
|
|
|
|
|
|
this.setViewport = function ( x, y, width, height ) {
|
|
|
|
|
|
- _viewportX = x;
|
|
|
- _viewportY = y;
|
|
|
+ _viewportX = x !== undefined ? x : 0;
|
|
|
+ _viewportY = y !== undefined ? y : 0;
|
|
|
|
|
|
- _viewportWidth = width;
|
|
|
- _viewportHeight = height;
|
|
|
+ _viewportWidth = width !== undefined ? width : _canvas.width;
|
|
|
+ _viewportHeight = height !== undefined ? height : _canvas.height;
|
|
|
|
|
|
_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 ) {
|
|
|
|