Skip to content

Commit

Permalink
WebGLRenderer render method: accept Object3D as first argument
Browse files Browse the repository at this point in the history
Signed-off-by: martinRenou <martin.renou@gmail.com>
  • Loading branch information
martinRenou committed Jun 5, 2020
1 parent 400acd3 commit 791657d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions docs/api/en/renderers/WebGLRenderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -409,9 +409,10 @@ <h3>[method:null readRenderTargetPixels]( [param:WebGLRenderTarget renderTarget]
<p>For reading out a [page:WebGLCubeRenderTarget WebGLCubeRenderTarget] use the optional parameter activeCubeFaceIndex to determine which face should be read.</p>


<h3>[method:null render]( [param:Scene scene], [param:Camera camera] )</h3>
<h3>[method:null render]( [param:Scene scene], [param:Camera camera] )<br />
[method:null render]( [param:Object3D object], [param:Camera camera] )</h3>
<p>
Render a [page:Scene scene] using a [page:Camera camera].<br />
Render a [page:Scene scene] or an [page:Object3D object] using a [page:Camera camera].<br />

The render is done to a previously specified [page:WebGLRenderTarget renderTarget] set by calling [page:WebGLRenderer.setRenderTarget .setRenderTarget] or to the canvas as usual.<br />

Expand Down
3 changes: 2 additions & 1 deletion docs/api/zh/renderers/WebGLRenderer.html
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,8 @@ <h3>[method:null readRenderTargetPixels]( [param:WebGLRenderTarget renderTarget]
示例:[example:webgl_interactive_cubes_gpu interactive / cubes / gpu]</p>
<p>For reading out a [page:WebGLCubeRenderTarget WebGLCubeRenderTarget] use the optional parameter activeCubeFaceIndex to determine which face should be read.</p>

<h3>[method:null render]( [param:Scene scene], [param:Camera camera], [param:WebGLRenderTarget renderTarget], [param:Boolean forceClear] )</h3>
<h3>[method:null render]( [param:Scene scene], [param:Camera camera] )<br />
[method:null render]( [param:Object3D object], [param:Camera camera] )</h3>
<p>
用相机([page:Camera camera])渲染一个场景([page:Scene scene])<br />

Expand Down
4 changes: 2 additions & 2 deletions src/renderers/WebGLRenderer.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ export class WebGLRenderer implements Renderer {
): void;

/**
* Render a scene using a camera.
* Render a scene or an object using a camera.
* The render is done to a previously specified {@link WebGLRenderTarget#renderTarget .renderTarget} set by calling
* {@link WebGLRenderer#setRenderTarget .setRenderTarget} or to the canvas as usual.
*
Expand All @@ -350,7 +350,7 @@ export class WebGLRenderer implements Renderer {
* properties to false. To forcibly clear one ore more buffers call {@link WebGLRenderer#clear .clear}.
*/
render(
scene: Scene,
scene: Scene | Object3D,
camera: Camera
): void;

Expand Down

0 comments on commit 791657d

Please sign in to comment.