gameforge - v0.1.12
    Preparing search index...

    Class RenderTextureSystem

    System plugin to the renderer to manage render textures.

    Should be added after FramebufferSystem

    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.

    PIXI

    Implements

    Index

    Constructors

    Properties

    current: null | RenderTexture

    Render texture currently bound. {@code null} if rendering to the canvas.

    defaultMaskStack: MaskData[]

    List of masks for the PIXI.StencilSystem.

    destinationFrame: Rectangle

    The destination frame for the render-target's projection mapping.

    See PIXI.ProjectionSystem#destinationFrame for more details.

    sourceFrame: Rectangle

    The source frame for the render-target's projection mapping.

    See PIXI.ProjectionSystem#sourceFrame for more details

    viewportFrame: Rectangle

    The viewport frame for the render-target's viewport binding. This is equal to the destination-frame for render-textures, while it is y-flipped when rendering to the screen (i.e. its origin is always on the bottom-left).

    Methods

    • Bind the current render texture.

      Parameters

      • OptionalrenderTexture: RenderTexture

        RenderTexture to bind, by default its null - the screen.

      • OptionalsourceFrame: Rectangle

        Part of world that is mapped to the renderTexture.

      • OptionaldestinationFrame: Rectangle

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

      Returns void

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

      Parameters

      • OptionalclearColor: ColorSource

        The color as rgba, default to use the renderer backgroundColor

      • Optionalmask: BUFFER_BITS

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

      Returns void

    • Returns void

    • Generic destroy methods to be overridden by the subclass

      Returns void

    • Resets render-texture state.

      Returns void

    • Returns void