Options
All
  • Public
  • Public/Protected
  • All
Menu

Class RenderTextureSystem

System plugin to the renderer to manage render textures.

Should be added after FramebufferSystem

Frames

The RenderTextureSystem holds a sourceFrame → destinationFrame projection. The following table explains the different coordinate spaces used:

Frame Description Coordinate System
sourceFrame The rectangle inside of which display-objects are being rendered World Space: The origin on the top-left
destinationFrame The rectangle in the render-target (canvas or texture) into which contents should be rendered If rendering to the canvas, this is in screen space and the origin is on the top-left. If rendering to a render-texture, this is in its base-texture's space with the origin on the bottom-left.
viewportFrame The framebuffer viewport corresponding to the destination-frame Window Coordinates: The origin is always on the bottom-left.
memberof

PIXI

Hierarchy

Index

Constructors

constructor

Properties

clearColor

clearColor: number[]

current

current: RenderTexture

defaultMaskStack

defaultMaskStack: MaskData[]

Readonly destinationFrame

destinationFrame: Rectangle

renderer

renderer: Renderer

Readonly sourceFrame

sourceFrame: Rectangle

Readonly viewportFrame

viewportFrame: Rectangle

Methods

bind

  • Bind the current render texture

    Parameters

    Returns void

clear

  • clear(clearColor?: number[], mask?: BUFFER_BITS): void
  • Erases the render texture and fills the drawing area with a colour

    Parameters

    • Optional clearColor: number[]
    • Optional mask: BUFFER_BITS

    Returns void

    Returns itself.

destroy

  • destroy(): void
  • Generic destroy methods to be overridden by the subclass

    Returns void

reset

  • reset(): void
  • Resets renderTexture state

    Returns void

resize

  • resize(): void
  • Returns void

Generated using TypeDoc