Phaser API Documentation

  Version: 

Member of: Phaser.Utils.Array

<static> Flatten(array, [output])

Description:

Takes an array and flattens it, returning a shallow-copy flattened array.

Parameters:

name type arguments description
array array

The array to flatten.

output array <optional>

An array to hold the results in.

Returns:
Description:

The flattened output array.

Type:
  • array
Since: 3.60.0
Source: src/utils/array/Flatten.js (Line 7)