提交 902fddb7 编写于 作者: W WestLangley

WebGLRenderer: added getPhysicalSize()

上级 8b3bd828
......@@ -348,6 +348,9 @@
<h3>[method:Number getMaxAnisotropy]()</h3>
<div>This returns the anisotropy level of the textures.</div>
<h3>[method:Object getPhysicalSize]()</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>
......@@ -355,7 +358,7 @@
<div>This gets the precision used by the shaders. It returns "highp","mediump" or "lowp".</div>
<h3>[method:Object getSize]()</h3>
<div>Returns an object containing the width and height of the renderer's output canvas, in pixels.</div>
<div>Returns an object containing the logical width and height of the renderer's output canvas, in pixels.</div>
<h3>[method:null resetGLState]( )</h3>
<div>Reset the GL state to default. Called internally if the WebGL context is lost.</div>
......
......@@ -415,6 +415,15 @@ function WebGLRenderer( parameters ) {
};
this.getPhysicalSize = function () {
return {
width: _canvas.width,
height: _canvas.height
};
};
this.setSize = function ( width, height, updateStyle ) {
_width = width;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册