|
@@ -425,6 +425,20 @@ function WebGLRenderer( parameters ) {
|
|
|
|
|
|
};
|
|
|
|
|
|
+ this.setDrawingBufferSize = function ( width, height, pixelRatio ) {
|
|
|
+
|
|
|
+ _width = width;
|
|
|
+ _height = height;
|
|
|
+
|
|
|
+ _pixelRatio = pixelRatio;
|
|
|
+
|
|
|
+ _canvas.width = width * pixelRatio;
|
|
|
+ _canvas.height = height * pixelRatio;
|
|
|
+
|
|
|
+ this.setViewport( 0, 0, width, height );
|
|
|
+
|
|
|
+ };
|
|
|
+
|
|
|
this.setViewport = function ( x, y, width, height ) {
|
|
|
|
|
|
_viewport.set( x, _height - y - height, width, height )
|