phaser - v4.0.0-rc.4
    Preparing search index...

    Handles render steps for a Game Object. The render step is a point in the render process that allows you to inject your own logic.

    interface RenderSteps {
        addRenderStep(fn: RenderWebGLStep, index?: number): this;
        renderWebGLStep(
            renderer: WebGLRenderer,
            gameObject: GameObject,
            drawingContext: DrawingContext,
            parentMatrix?: TransformMatrix,
            renderStep?: number,
            displayList?: GameObject[],
            displayListIndex?: number,
        ): void;
    }

    Implemented by

    Index

    Methods

    • Add a render step.

      The first render step in _renderSteps is run first. It should call the next render step in the list. This allows render steps to control the rendering flow.

      Parameters

      • fn: RenderWebGLStep

        The render step function to add.

      • Optionalindex: number

        The index in the render list to add the step to. Omit to add to the end.

      Returns this

    • Run a step in the render process. This is called automatically by the Render module.

      In most cases, it just runs the renderWebGL function.

      When _renderSteps has more than one entry, such as when Filters are enabled for this object, it allows those processes to defer renderWebGL and otherwise manage the flow of rendering.

      Parameters

      • renderer: WebGLRenderer

        The WebGL Renderer instance to render with.

      • gameObject: GameObject

        The Game Object being rendered.

      • drawingContext: DrawingContext

        The current drawing context.

      • OptionalparentMatrix: TransformMatrix

        The parent matrix of the Game Object, if it has one.

      • OptionalrenderStep: number

        Which step of the rendering process should be run? Default 0.

      • OptionaldisplayList: GameObject[]

        The display list which is currently being rendered. If not provided, it will be created with the Game Object.

      • OptionaldisplayListIndex: number

        The index of the Game Object within the display list. Default 0.

      Returns void