Phaser API Documentation

batchStrokeTriangle(x0, y0, x1, y1, x2, y2, lineWidth, currentMatrix, parentMatrix)


Pushes a stroked triangle into the vertex batch.

Triangle factors in the given transform matrices before adding to the batch.

The triangle is created from 3 lines and drawn using the batchStrokePath method.


name type description
x0 number

Point 0 x coordinate.

y0 number

Point 0 y coordinate.

x1 number

Point 1 x coordinate.

y1 number

Point 1 y coordinate.

x2 number

Point 2 x coordinate.

y2 number

Point 2 y coordinate.

lineWidth number

The width of the line in pixels.

currentMatrix Phaser.GameObjects.Components.TransformMatrix

The current transform.

parentMatrix Phaser.GameObjects.Components.TransformMatrix

The parent transform.