Phaser API Documentation

  Version: 

Member of: Phaser.Curves.Path

getCurveLengths()

Description:

Returns an array containing the length of the Path at the end of each Curve.

The result of this method will be cached to avoid recalculating it in subsequent calls. The cache is only invalidated when the #curves array changes in length, leading to potential inaccuracies if a Curve in the Path is changed, or if a Curve is removed and another is added in its place.

Returns:
Description:

An array containing the length of the Path at the end of each one of its Curves.

Type:
  • Array.<number>
Since: 3.0.0
Source: src/curves/path/Path.js (Line 435)