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

FillTri

A RenderNode which renders a filled triangle.

Constructor

new FillTri(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/FillTri.js#L10
Since: 4.0.0

Inherited Members

From Phaser.Renderer.WebGL.RenderNodes.RenderNode:


Inherited Methods

From Phaser.Renderer.WebGL.RenderNodes.RenderNode:


Public Methods

run

<instance> run(drawingContext, currentMatrix, submitterNode, xA, yA, xB, yB, xC, yC, tintA, tintB, tintC, lighting)

Description:

Render the triangle.

Parameters:

nametypeoptionaldescription
drawingContextPhaser.Renderer.WebGL.DrawingContextNoThe context currently in use.
currentMatrixPhaser.GameObjects.Components.TransformMatrixNoA transform matrix to apply to the vertices. If not defined, the vertices are not transformed.
submitterNodePhaser.Renderer.WebGL.RenderNodes.BatchHandlerTriFlatNoThe Submitter node to use.
xAnumberNoThe x-coordinate of the first vertex.
yAnumberNoThe y-coordinate of the first vertex.
xBnumberNoThe x-coordinate of the second vertex.
yBnumberNoThe y-coordinate of the second vertex.
xCnumberNoThe x-coordinate of the third vertex.
yCnumberNoThe y-coordinate of the third vertex.
tintAnumberNoThe tint color of the first vertex.
tintBnumberNoThe tint color of the second vertex.
tintCnumberNoThe tint color of the third vertex.
lightingbooleanNoWhether to apply lighting effects to the triangle.

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

Source: src/renderer/webgl/renderNodes/FillTri.js#L43
Since: 4.0.0