Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WebGLMultipleRenderTargets: Add Options to Constructor #22772

Merged
merged 4 commits into from
Feb 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions docs/api/en/renderers/WebGLMultipleRenderTargets.html
Original file line number Diff line number Diff line change
@@ -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 />

zalo marked this conversation as resolved.
Show resolved Hide resolved
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>
4 changes: 2 additions & 2 deletions src/renderers/WebGLMultipleRenderTargets.js
Original file line number Diff line number Diff line change
@@ -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;