Browse Source

WebGLMultipleRenderTargets: Add Options to Constructor (#22772)

* WebGLMultipleRenderTargets: Add Options to Constructor

* Update WebGLMultipleRenderTargets Documentation with new options

* Add line break

* WebGLMultipleRenderTargets: Use default parameter.

Co-authored-by: Michael Herzog <[email protected]>
Johnathon Selstad 3 years ago
parent
commit
680f6c9e72

+ 8 - 2
docs/api/en/renderers/WebGLMultipleRenderTargets.html

@@ -27,12 +27,18 @@
 		<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>

+ 2 - 2
src/renderers/WebGLMultipleRenderTargets.js

@@ -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;