DrawLine
A RenderNode which computes the geometry of a line segment.
Constructor
new DrawLine(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/DrawLine.js#L10
Since: 4.0.0
Inherited Methods
From Phaser.Renderer.WebGL.RenderNodes.RenderNode:
Public Methods
run
<instance> run(drawingContext, currentMatrix, ax, ay, bx, by, aLineWidth, bLineWidth, vertices)
Description:
Get the transformed vertices of a line segment as a quad.
The values are pushed to a vertices list in the order TL, BL, BR, TR.
Parameters:
| name | type | optional | description |
|---|---|---|---|
| drawingContext | Phaser.Renderer.WebGL.DrawingContext | No | The context currently in use. |
| currentMatrix | Phaser.GameObjects.Components.TransformMatrix | No | A transform matrix to apply to the vertices. If not defined, the vertices are not transformed. |
| ax | number | No | The x coordinate of the start of the line. |
| ay | number | No | The y coordinate of the start of the line. |
| bx | number | No | The x coordinate of the end of the line. |
| by | number | No | The y coordinate of the end of the line. |
| aLineWidth | number | No | The width of the line at the start. |
| bLineWidth | number | No | The width of the line at the end. |
| vertices | Array.<number> | No | The list to which the vertices are assigned. |
Overrides: Phaser.Renderer.WebGL.RenderNodes.RenderNode#run
Source: src/renderer/webgl/renderNodes/DrawLine.js#L29
Since: 4.0.0
Inherited Members
From Phaser.Renderer.WebGL.RenderNodes.RenderNode: