Phaser API Documentation

  Version: 
strokePoints(points, [closeShape], [closePath], [endIndex])

Description:

Stroke the shape represented by the given array of points.

Pass closeShape to automatically close the shape by joining the last to the first point.

Pass closePath to automatically close the path before it is stroked.

Parameters:

name type arguments Default description
points array | Array.<Phaser.Geom.Point>

The points to stroke.

closeShape boolean <optional> false

When true, the shape is closed by joining the last point to the first point.

closePath boolean <optional> false

When true, the path is closed before being stroked.

endIndex number <optional>

The index of points to stop drawing at. Defaults to points.length.

Returns:
Description:

This Game Object.

Since: 3.0.0