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

Merge pull request #11374 from WestLangley/dev-dpr

WebGLRenderer: added getPhysicalSize()
......@@ -353,6 +353,9 @@
<h3>[method:Number getMaxAnisotropy]()</h3>
<div>This returns the anisotropy level of the textures.</div>
<h3>[method:Object getDrawingBufferSize]()</h3>
<div>Returns an object containing the width and height of the renderer's drawing buffer, in pixels.</div>
<h3>[method:number getPixelRatio]()</h3>
<div>Returns current device pixel ratio used.</div>
......
......@@ -406,6 +406,15 @@ function WebGLRenderer( parameters ) {
};
this.getDrawingBufferSize = function () {
return {
width: _width * _pixelRatio,
height: _height * _pixelRatio
};
};
this.setSize = function ( width, height, updateStyle ) {
var device = vr.getDevice();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册