Phaser API Documentation

  Version: 
batchLine(ax, ay, bx, by, aLineWidth, bLineWidth, index, closePath, currentMatrix, parentMatrix)

Description:

Creates a line out of 4 quads and adds it to the vertex batch based on the given line values.

Parameters:

name type description
ax number

x coordinate of the start of the line.

ay number

y coordinate of the start of the line.

bx number

x coordinate of the end of the line.

by number

y coordinate of the end of the line.

aLineWidth number

Width of the start of the line.

bLineWidth number

Width of the end of the line.

index number

If this line is part of a multi-line draw, the index of the line in the draw.

closePath boolean

Does this line close a multi-line path?

currentMatrix Phaser.GameObjects.Components.TransformMatrix

The current transform.

parentMatrix Phaser.GameObjects.Components.TransformMatrix

The parent transform.