Class: RenderTextureSystem

System plugin to the renderer to manage render textures.

Should be added after FramebufferSystem

new (renderer)

Name Type Description
renderer PIXI.Renderer

The renderer this System works for.



clearColor Array.<number>

The clear background color as rgba

current PIXI.RenderTexture readonly

Render texture

defaultMaskStack Array.<PIXI.Graphics> readonly

List of masks for the StencilSystem

destinationFrame PIXI.Rectangle readonly

Destination frame

The renderer this manager works for.

sourceFrame PIXI.Rectangle readonly

Source frame


bind (renderTexture, sourceFrame, destinationFrame)

Bind the current render texture

Name Type Default Description
renderTexture PIXI.RenderTexture null optional

RenderTexture to bind, by default its null, the screen

sourceFrame PIXI.Rectangle optional

part of screen that is mapped to the renderTexture

destinationFrame PIXI.Rectangle optional

part of renderTexture, by default it has the same size as sourceFrame

clear (clearColor, mask)PIXI.Renderer

Erases the render texture and fills the drawing area with a colour

Name Type Default Description
clearColor Array.<number> optional

The color as rgba, default to use the renderer backgroundColor


Bitwise OR of masks that indicate the buffers to be cleared, by default COLOR and DEPTH buffers.

Type Description
PIXI.Renderer Returns itself.

destroy () inherited

Generic destroy methods to be overridden by the subclass

Resets renderTexture state