Skip to main content
Version: Phaser v4.0.0-rc.6

StrokePath

A RenderNode which renders a stroke path consisting of several line segments,

potentially closed at the end.

Constructor

new StrokePath(manager)

Parameters

nametypeoptionaldescription
managerPhaser.Renderer.WebGL.RenderNodes.RenderNodeManagerNoThe manager that owns this RenderNode.

Scope: static

Extends

Phaser.Renderer.WebGL.RenderNodes.RenderNode

Source: src/renderer/webgl/renderNodes/StrokePath.js#L10
Since: 4.0.0

Inherited Members

From Phaser.Renderer.WebGL.RenderNodes.RenderNode:


Public Members

drawLineNode

drawLineNode: Phaser.Renderer.WebGL.RenderNodes.DrawLine

Description:

The RenderNode that generates a line segment.

Source: src/renderer/webgl/renderNodes/StrokePath.js#L29
Since: 4.0.0


Inherited Methods

From Phaser.Renderer.WebGL.RenderNodes.RenderNode:


Public Methods

run

<instance> run(drawingContext, submitterNode, path, lineWidth, open, currentMatrix, tintTL, tintTR, tintBL, tintBR, detail, lighting)

Description:

Render a stroke path consisting of several line segments.

Parameters:

nametypeoptionaldescription
drawingContextPhaser.Renderer.WebGL.DrawingContextNoThe context currently in use.
submitterNodePhaser.Renderer.WebGL.RenderNodes.BatchHandlerTriFlatNoThe Submitter node to use.
pathArray.<Phaser.Types.GameObjects.Graphics.WidePoint>NoThe points that define the line segments.
lineWidthnumberNoThe width of the stroke.
openbooleanNoWhether the stroke is open or closed.
currentMatrixPhaser.GameObjects.Components.TransformMatrixNoThe current transform matrix.
tintTLnumberNoThe top-left tint color.
tintTRnumberNoThe top-right tint color.
tintBLnumberNoThe bottom-left tint color.
tintBRnumberNoThe bottom-right tint color.
detailnumberNoThe level of detail to use when rendering the stroke. 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.
lightingbooleanNoWhether to apply lighting effects to the stroke.

Overrides: Phaser.Renderer.WebGL.RenderNodes.RenderNode#run

Source: src/renderer/webgl/renderNodes/StrokePath.js#L39
Since: 4.0.0