提交 e68f69f0 编写于 作者: M Mr.doob

WebGLRenderer: Added .setDrawingBufferSize(). Related to #11374.

上级 d394e74d
......@@ -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 )
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册