new Matrix3( [m])
Parameters:
Name | Type | Argument | Description |
---|---|---|---|
m |
Phaser.Math.Matrix3 |
<optional> |
Optional Matrix3 to copy values from. |
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 12)
Members
-
val :Float32Array
-
The matrix values.
Type:
- Float32Array
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 31)
Methods
-
adjoint()
-
Calculate the adjoint, or adjugate, of this Matrix.
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 262)
Returns:
This Matrix3.
- Type
- Phaser.Math.Matrix3
-
clone()
-
Make a clone of this Matrix3.
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 52)
Returns:
A clone of this Matrix3.
- Type
- Phaser.Math.Matrix3
-
copy(src)
-
Copy the values of a given Matrix into this Matrix.
Parameters:
Name Type Description src
Phaser.Math.Matrix3 The Matrix to copy the values from.
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 80)
Returns:
This Matrix3.
- Type
- Phaser.Math.Matrix3
-
determinant()
-
Calculate the determinant of this Matrix.
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 297)
Returns:
The determinant of this Matrix.
- Type
- number
-
fromArray(a)
-
Set the values of this Matrix from the given array.
Parameters:
Name Type Description a
array The array to copy the values from.
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 136)
Returns:
This Matrix3.
- Type
- Phaser.Math.Matrix3
-
fromMat4(m)
-
Copy the values of a given Matrix4 into this Matrix3.
Parameters:
Name Type Description m
Phaser.Math.Matrix4 The Matrix4 to copy the values from.
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 108)
Returns:
This Matrix3.
- Type
- Phaser.Math.Matrix3
-
fromQuat(q)
-
Set the values of this Matrix from the given Quaternion.
Parameters:
Name Type Description q
Phaser.Math.Quaternion The Quaternion to set the values of this Matrix from.
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 460)
Returns:
This Matrix3.
- Type
- Phaser.Math.Matrix3
-
identity()
-
Reset this Matrix to an identity (default) matrix.
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 163)
Returns:
This Matrix3.
- Type
- Phaser.Math.Matrix3
-
invert()
-
Invert this Matrix.
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 213)
Returns:
This Matrix3.
- Type
- Phaser.Math.Matrix3
-
multiply(src)
-
Multiply this Matrix by the given Matrix.
Parameters:
Name Type Description src
Phaser.Math.Matrix3 The Matrix to multiply this Matrix by.
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 322)
Returns:
This Matrix3.
- Type
- Phaser.Math.Matrix3
-
normalFromMat4(m)
-
Set the values of this Matrix3 to be normalized from the given Matrix4.
Parameters:
Name Type Description m
Phaser.Math.Matrix4 The Matrix4 to normalize the values from.
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 510)
Returns:
This Matrix3.
- Type
- Phaser.Math.Matrix3
-
rotate(rad)
-
Apply a rotation transformation to this Matrix.
Parameters:
Name Type Description rad
number The angle in radians to rotate by.
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 396)
Returns:
This Matrix3.
- Type
- Phaser.Math.Matrix3
-
scale(v)
-
Apply a scale transformation to this Matrix.
Uses the
x
andy
components of the given Vector to scale the Matrix.Parameters:
Name Type Description v
Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4 The Vector to scale this Matrix with.
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 431)
Returns:
This Matrix3.
- Type
- Phaser.Math.Matrix3
-
set(src)
-
This method is an alias for
Matrix3.copy
.Parameters:
Name Type Description src
Phaser.Math.Matrix3 The Matrix to set the values of this Matrix's from.
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 65)
Returns:
This Matrix3.
- Type
- Phaser.Math.Matrix3
-
translate(v)
-
Translate this Matrix using the given Vector.
Parameters:
Name Type Description v
Phaser.Math.Vector2 | Phaser.Math.Vector3 | Phaser.Math.Vector4 The Vector to translate this Matrix with.
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 373)
Returns:
This Matrix3.
- Type
- Phaser.Math.Matrix3
-
transpose()
-
Transpose this Matrix.
- Since: 3.0.0
- Source: src/math/Matrix3.js (Line 188)
Returns:
This Matrix3.
- Type
- Phaser.Math.Matrix3