Phaser API Documentation

  Version: 
getLengths([divisions])

Description:

Get a list of cumulative segment lengths.

These lengths are

  • [0] 0
  • [1] The first segment
  • [2] The first and second segment
  • ...
  • [divisions] All segments

Parameters:

name type arguments description
divisions number <optional>

The number of divisions or segments.

Returns:
Description:

An array of cumulative lengths.

Type:
  • Array.
Examples:
Since: 3.0.0
Source: src/curves/Curve.js (Line 222)