new PIXI.RenderTarget(gl, width, height, scaleMode, resolution, root)
Name | Type | Description |
---|---|---|
gl |
WebGLRenderingContext |
the current WebGL drawing context |
width |
number |
the horizontal range of the filter |
height |
number |
the vertical range of the filter |
scaleMode |
number |
See PIXI.SCALE_MODES for possible values |
resolution |
number |
the current resolution |
root |
boolean |
Whether this object is the root element or not |
Members
-
filterStackArray.<object>
-
Stores filter data for the render target
-
framePIXI.Rectangle
-
The frame.
-
frameBufferWebGLFrameBuffer
-
A frame buffer
-
glWebGLRenderingContext
-
The current WebGL drawing context.
-
projectionMatrixPIXI.Matrix
-
The projection matrix
-
resolutionnumber
-
The current resolution
-
rootboolean
-
Whether this object is the root element or not
-
scaleModenumber
-
The scale mode.
- Default Value:
- PIXI.SCALE_MODES.DEFAULT
- See:
-
sizePIXI.Rectangle
-
The size of the object as a rectangle
-
stencilBufferWebGLRenderBuffer
-
The stencil buffer stores masking data for the render target
-
stencilMaskStackPIXI.StencilMaskStack
-
The data structure for the stencil masks
-
texturePIXI.Texture
-
The texture
-
transformPIXI.Matrix
-
The object's transform
Methods
-
activate()
-
Binds the buffers and initialises the viewport.
-
attachStencilBuffer()
-
Binds the stencil buffer.
-
calculateProjection()
-
Updates the projection matrix based on a projection frame (which is a rectangle)
-
clear(bind)
-
Clears the filter texture.
Name Type Default Description bind
boolean false optional Should we bind our framebuffer before clearing?
-
Destroys the render target.
-
resize(width, height)
-
Resizes the texture to the specified width and height
Name Type Description width
Number the new width of the texture
height
Number the new height of the texture