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();