A reference to the WebGLRenderer.
The width of this Render Target.
The height of this Render Target.
Optionalscale: numberA value between 0 and 1. Controls the size of this Render Target in relation to the Renderer. Default 1.
OptionalminFilter: numberThe minFilter mode of the texture when created. 0 is LINEAR, 1 is NEAREST. Default 0.
OptionalautoClear: booleanAutomatically clear this framebuffer when bound? Default true.
OptionalautoResize: booleanAutomatically resize this Render Target if the WebGL Renderer resizes? Default false.
OptionaladdDepthBuffer: booleanAdd a DEPTH_STENCIL and attachment to this Render Target? Default true.
OptionalforceClamp: booleanForce the texture to use the CLAMP_TO_EDGE wrap mode, even if a power of two? Default true.
Controls if this Render Target is automatically cleared (via gl.COLOR_BUFFER_BIT)
during the RenderTarget.bind method.
If you need more control over how, or if, the target is cleared, you can disable this via the config on creation, or even toggle it directly at runtime.
ReadonlyautoDoes this Render Target automatically resize when the WebGL Renderer does?
Modify this property via the setAutoResize method.
Removes all external references from this class and deletes the WebGL framebuffer and texture instances.
Does not remove this Render Target from the parent pipeline.
Force the WebGL Texture to use the CLAMP_TO_EDGE wrap mode, even if a power of two?
If false it will use gl.REPEAT instead, which may be required for some effects, such
as using this Render Target as a texture for a Shader.
The Framebuffer of this Render Target.
This is created in the RenderTarget.resize method.
ReadonlyhasDoes this Render Target have a Depth Buffer?
ReadonlyheightThe height of the texture.
The minFilter mode of the texture. 0 is LINEAR, 1 is NEAREST.
A reference to the WebGLRenderer instance.
A value between 0 and 1. Controls the size of this Render Target in relation to the Renderer.
A value of 1 matches it. 0.5 makes the Render Target half the size of the renderer, etc.
The WebGLTextureWrapper of this Render Target.
This is created in the RenderTarget.resize method.
Unbinds this Render Target and optionally flushes the WebGL Renderer first.
ReadonlywidthThe width of the texture.
Adjusts the GL viewport to match the width and height of this Render Target.
Also disables SCISSOR_TEST.
Pushes this Render Target as the current frame buffer of the renderer.
If autoClear is set, then clears the texture.
If adjustViewport is true then it will flush the renderer and then adjust the GL viewport.
OptionaladjustViewport: booleanAdjust the GL viewport by calling RenderTarget.adjustViewport ? Default false.
Optionalwidth: numberOptional new width of this Render Target.
Optionalheight: numberOptional new height of this Render Target.
Clears a portion or everything from this Render Target. To clear an area,
specify the x, y, width and height.
Optionalx: numberThe left coordinate of the fill rectangle. Default 0.
Optionaly: numberThe top coordinate of the fill rectangle. Default 0.
Optionalwidth: numberThe width of the fill rectangle. Default this.width.
Optionalheight: numberThe height of the fill rectangle. Default this.height.
Sets up this Render Target to the given width and height, creating a new frame buffer and texture. This method is called automatically by the constructor and at no other time.
The new width of this Render Target.
The new height of this Render Target.
Resizes this Render Target as long as the given width and height are different to the current width and height.
Deletes both the frame buffer and texture, if they exist and then re-creates them using the new sizes.
This method is called automatically by the pipeline during its resize handler.
The new width of this Render Target.
The new height of this Render Target.
Sets if this Render Target should automatically resize when the WebGL Renderer emits a resize event.
Automatically resize this Render Target when the WebGL Renderer resizes?
Checks if this Render Target will resize, or not, if given the new width and height values.
The new width of this Render Target.
The new height of this Render Target.
A Render Target encapsulates a WebGL framebuffer and the WebGL Texture that displays it.
Instances of this class are typically created by, and belong to WebGL Pipelines, however other Game Objects and classes can take advantage of Render Targets as well.