Phaser API Documentation

batchQuad(x0, y0, x1, y1, x2, y2, x3, y3, tintTL, tintTR, tintBL, tintBR)


Adds the vertices data into the batch and flushes if full.

Assumes 6 vertices in the following arrangement:

|\  B|
| \  |
|  \ |
| A \|
|    \

Where tx0/ty0 = 0, tx1/ty1 = 1, tx2/ty2 = 2 and tx3/ty3 = 3


name type description
x0 number

The top-left x position.

y0 number

The top-left y position.

x1 number

The bottom-left x position.

y1 number

The bottom-left y position.

x2 number

The bottom-right x position.

y2 number

The bottom-right y position.

x3 number

The top-right x position.

y3 number

The top-right y position.

tintTL number

The top-left tint color value.

tintTR number

The top-right tint color value.

tintBL number

The bottom-left tint color value.

tintBR number

The bottom-right tint color value.


true if this method caused the batch to flush, otherwise false.

  • boolean