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

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

Name Type Description
clearColor Array.<number> optional

The color as rgba, default to use the renderer backgroundColor

Type Description
PIXI.Renderer Returns itself.

contextChange (gl) inherited

Generic method called when there is a WebGL context change.

Name Type Description
gl WebGLRenderingContext

new webgl context

destroy () inherited

Generic destroy methods to be overridden by the subclass

Resets renderTexture state