Phaser API Documentation


Member of: Phaser.Curves.Path



Ensures that the Path is closed.

A closed Path starts and ends at the same point. If the Path is not closed, a straight Line Curve will be created from the ending point directly to the starting point. During the check, the actual starting point of the Path, i.e. the starting point of the first Curve, will be used as opposed to the Path's defined startPoint, which could differ.

Calling this method on an empty Path will result in an error.


This Path object.

Since: 3.0.0
Source: src/curves/path/Path.js (Line 168)