new PIXI.RenderTarget(gl, width, height, scaleMode, resolution, root)
| Name | Type | Default | Description |
|---|---|---|---|
gl |
WebGLRenderingContext |
The current WebGL drawing context |
|
width |
number | 0 |
optional
the horizontal range of the filter |
height |
number | 0 |
optional
the vertical range of the filter |
scaleMode |
number | PIXI.settings.SCALE_MODE |
optional
See PIXI.SCALE_MODES for possible values |
resolution |
number | 1 |
optional
The current resolution / device pixel ratio |
root |
boolean | false |
optional
Whether this object is the root element or not |
Methods
-
activate()
-
Binds the buffers and initialises the viewport.
-
attachStencilBuffer()
-
Binds the stencil buffer.
-
calculateProjection(destinationFrame, sourceFrame)
-
Updates the projection matrix based on a projection frame (which is a rectangle)
Name Type Description destinationFrameRectangle The destination frame.
sourceFrameRectangle The source frame.
-
clear(clearColor)
-
Clears the filter texture.
Name Type Default Description clearColorArray.<number> this.clearColor optional Array of [r,g,b,a] to clear the framebuffer
-
Destroys the render target.
-
resize(width, height)
-
Resizes the texture to the specified width and height
Name Type Description widthnumber the new width of the texture
heightnumber the new height of the texture
-
setFrame(destinationFrame, sourceFrame)
-
Sets the frame of the render target.
Name Type Description destinationFrameRectangle The destination frame.
sourceFrameRectangle The source frame.