提交 f3aacc34 编写于 作者: M Mugen87

SVGRenderer: Add getSize().

上级 352a3250
......@@ -59,6 +59,11 @@
Tells the renderer to clear its drawing surface.
</p>
<h3>[method:Object getSize]()</h3>
<p>
Returns an object containing the width and height of the renderer.
</p>
<h3>[method:null render]( [param:Scene scene], [param:Camera camera] )</h3>
<p>
Renders a [page:Scene scene] using a [page:Camera camera].
......
......@@ -52,6 +52,11 @@
告诉渲染器来清除其绘图表面。
</p>
<h3>[method:Object getSize]()</h3>
<p>
返回一个包含有渲染器宽和高的对象。
</p>
<h3>[method:null render]( [param:Scene scene], [param:Camera camera] )</h3>
<p>
使用[page:Camera camera]来渲染一个[page:Scene scene]。
......
......@@ -101,6 +101,15 @@ THREE.SVGRenderer = function () {
};
this.getSize = function () {
return {
width: _svgWidth,
height: _svgHeight
};
};
this.setPrecision = function ( precision ) {
_precision = precision;
......
......@@ -22,6 +22,7 @@ export class SVGRenderer {
overdraw: number;
info: {render: {vertices: number, faces: number}};
getSize(): { width: number, height: number };
setQuality( quality: string ): void;
setClearColor( color: Color, alpha: number ): void;
setPixelRatio(): void;
......
......@@ -114,6 +114,15 @@ var SVGRenderer = function () {
};
this.getSize = function () {
return {
width: _svgWidth,
height: _svgHeight
};
};
this.setPrecision = function ( precision ) {
_precision = precision;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册