提交 ed00cd63 编写于 作者: G gero3

make autoResize optional. Fixes #2969

上级 973d261a
......@@ -293,15 +293,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.
先完成此消息的编辑!
想要评论请 注册