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

    A RenderNode which fills a path.

    It works by taking the array of path data and then passing it through Earcut, which creates a list of polygons. Each polygon is then added to the batch. The polygons are triangles, but they're rendered as quads to be compatible with other batched quads.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    The manager that owns this RenderNode.

    name: string

    The name of the RenderNode.

    Methods

    • By default this is an empty method hook that you can override and use in your own custom render nodes.

      This method is called at the start of the run method. Don't forget to call it in your custom method.

      Parameters

      Returns void

    • By default this is an empty method hook that you can override and use in your own custom render nodes.

      This method is called at the end of the run method. Don't forget to call it in your custom method.

      Parameters

      Returns void

    • Render the path using Earcut.

      Parameters

      • drawingContext: DrawingContext

        The context currently in use.

      • currentMatrix: TransformMatrix

        The current transform matrix.

      • submitterNode: BatchHandlerTriFlat

        The Submitter node to use.

      • path: WidePoint[]

        The points that define the line segments.

      • tintTL: number

        The top-left tint color.

      • tintTR: number

        The top-right tint color.

      • tintBL: number

        The bottom-left tint color.

      • detail: number

        The level of detail to use when filling the path. Points which are only this far apart in screen space are combined. It is ignored if the entire path is equal to or shorter than this distance.

      • lighting: boolean

        Whether to apply lighting effects to the path.

      Returns void

    • Set whether the node should report debug information. It wraps the run method with additional debug information.

      Parameters

      • debug: boolean

        Whether to report debug information.

      Returns void