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

Merge remote-tracking branch 'gero3/patch-6' into dev

......@@ -305,15 +305,24 @@ THREE.WebGLRenderer = function ( parameters ) {
};
this.setSize = function ( width, height ) {
this.setSize = function ( width, height, autoResize ) {
if ( autoResize === undefined ) {
autoResize = true;
}
_canvas.width = width * this.devicePixelRatio;
_canvas.height = height * this.devicePixelRatio;
_canvas.style.width = width + 'px';
_canvas.style.height = height + 'px';
if ( autoResize ){
_canvas.style.width = width + 'px';
_canvas.style.height = height + 'px';
}
this.setViewport( 0, 0, _canvas.width, _canvas.height );
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册