Namespace: Matrix

Phaser.Utils.Array. Matrix

Methods


<static> CheckMatrix(matrix)

[description]

Parameters:
Name Type Description
matrix array

[description]

Since: 3.0.0
Source: src/utils/array/matrix/CheckMatrix.js (Line 20)
Returns:

[description]

Type
boolean

<static> MatrixToString(matrix)

Generates a string (which you can pass to console.log) from the given Array Matrix.

Parameters:
Name Type Description
matrix array

A 2-dimensional array.

Since: 3.0.0
Source: src/utils/array/matrix/MatrixToString.js (Line 13)
Returns:

A string representing the matrix.

Type
string

<static> ReverseColumns(matrix)

Reverses the columns in the given Array Matrix.

Parameters:
Name Type Description
matrix array

The array matrix to reverse the columns for.

Since: 3.0.0
Source: src/utils/array/matrix/ReverseColumns.js (Line 7)
Returns:

The column reversed matrix.

Type
array

<static> ReverseRows(matrix)

[description]

Parameters:
Name Type Description
matrix array

[description]

Since: 3.0.0
Source: src/utils/array/matrix/ReverseRows.js (Line 7)
Returns:

[description]

Type
array

<static> Rotate180(matrix)

[description]

Parameters:
Name Type Description
matrix array

[description]

Since: 3.0.0
Source: src/utils/array/matrix/Rotate180.js (Line 9)
Returns:

[description]

Type
array

<static> RotateLeft(matrix)

[description]

Parameters:
Name Type Description
matrix array

[description]

Since: 3.0.0
Source: src/utils/array/matrix/RotateLeft.js (Line 9)
Returns:

[description]

Type
array

<static> RotateMatrix(matrix [, direction])

[description]

Parameters:
Name Type Argument Default Description
matrix array

The array to rotate.

direction number | string <optional>
90

The amount to rotate the matrix by. The value can be given in degrees: 90, -90, 270, -270 or 180, or a string command: rotateLeft, rotateRight or rotate180.

Since: 3.0.0
Source: src/utils/array/matrix/RotateMatrix.js (Line 12)
Returns:

The rotated matrix array. The source matrix should be discard for the returned matrix.

Type
array

<static> RotateRight(matrix)

[description]

Parameters:
Name Type Description
matrix array

[description]

Since: 3.0.0
Source: src/utils/array/matrix/RotateRight.js (Line 9)
Returns:

[description]

Type
array

<static> TransposeMatrix(array)

[description]

Parameters:
Name Type Description
array array

The array matrix to transpose.

Since: 3.0.0
Source: src/utils/array/matrix/TransposeMatrix.js (Line 10)
Returns:

A new array matrix which is a transposed version of the given array.

Type
array