Skip to content

Commit

Permalink
WebGLMultipleRenderTargets: Add Options to Constructor (mrdoob#22772)
Browse files Browse the repository at this point in the history
* WebGLMultipleRenderTargets: Add Options to Constructor

* Update WebGLMultipleRenderTargets Documentation with new options

* Add line break

* WebGLMultipleRenderTargets: Use default parameter.

Co-authored-by: Michael Herzog <michael.herzog@human-interactive.org>
  • Loading branch information
2 people authored and donmccurdy committed Mar 10, 2022
1 parent a3f40f7 commit 5af77ab
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 8 additions & 2 deletions docs/api/en/renderers/WebGLMultipleRenderTargets.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,18 @@ <h2>Examples</h2>
<h2>Constructor</h2>


<h3>[name]([param:Number width], [param:Number height], [param:Number count])</h3>
<h3>[name]([param:Number width], [param:Number height], [param:Number count], [param:Object options])</h3>

<p>
[page:Number width] - The width of the render target. <br />
[page:Number height] - The height of the render target.<br />
[page:Number count] - The number of render targets.
[page:Number count] - The number of render targets.<br />

options - (optional object that holds texture parameters for an auto-generated target
texture and depthBuffer/stencilBuffer booleans.

For an explanation of the texture parameters see [page:Texture Texture].
For a list of valid options, see [page:WebGLRenderTarget WebGLRenderTarget].<br /><br />
</p>

<h2>Properties</h2>
Expand Down
4 changes: 2 additions & 2 deletions src/renderers/WebGLMultipleRenderTargets.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { WebGLRenderTarget } from './WebGLRenderTarget.js';

class WebGLMultipleRenderTargets extends WebGLRenderTarget {

constructor( width, height, count ) {
constructor( width, height, count, options = {} ) {

super( width, height );
super( width, height, options );

const texture = this.texture;

Expand Down

0 comments on commit 5af77ab

Please sign in to comment.