Phaser API Documentation

  Version: 
batchFillPath(path, currentMatrix, parentMatrix)

Description:

Adds the given path to the vertex batch for rendering.

It works by taking the array of path data and then passing it through Earcut, which creates a list of polygons. Each polygon is then added to the batch.

The path is always automatically closed because it's filled.

Parameters:

name type description
path Array.<Phaser.Types.Math.Vector2Like>

Collection of points that represent the path.

currentMatrix Phaser.GameObjects.Components.TransformMatrix

The current transform.

parentMatrix Phaser.GameObjects.Components.TransformMatrix

The parent transform.