FillPath
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.
Constructor
new FillPath(manager)
Parameters
| name | type | optional | description |
|---|---|---|---|
| manager | Phaser.Renderer.WebGL.RenderNodes.RenderNodeManager | No | The manager that owns this RenderNode. |
Scope: static
Extends
Source: src/renderer/webgl/renderNodes/FillPath.js#L11
Since: 4.0.0
Inherited Methods
From Phaser.Renderer.WebGL.RenderNodes.RenderNode:
Public Methods
run
<instance> run(drawingContext, currentMatrix, submitterNode, path, tintTL, tintTR, tintBL, detail, lighting)
Description:
Render the path using Earcut.
Parameters:
| name | type | optional | description |
|---|---|---|---|
| drawingContext | Phaser.Renderer.WebGL.DrawingContext | No | The context currently in use. |
| currentMatrix | Phaser.GameObjects.Components.TransformMatrix | No | The current transform matrix. |
| submitterNode | Phaser.Renderer.WebGL.RenderNodes.BatchHandlerTriFlat | No | The Submitter node to use. |
| path | Array.<Phaser.Types.GameObjects.Graphics.WidePoint> | No | The points that define the line segments. |
| tintTL | number | No | The top-left tint color. |
| tintTR | number | No | The top-right tint color. |
| tintBL | number | No | The bottom-left tint color. |
| detail | number | No | 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 | No | Whether to apply lighting effects to the path. |
Overrides: Phaser.Renderer.WebGL.RenderNodes.RenderNode#run
Source: src/renderer/webgl/renderNodes/FillPath.js#L36
Since: 4.0.0
Inherited Members
From Phaser.Renderer.WebGL.RenderNodes.RenderNode: