Optional
a: numberx scale
Optional
b: numbery skew
Optional
c: numberx skew
Optional
d: numbery scale
Optional
tx: numberx translation
Optional
ty: numbery translation
Static
IDENTITYA default (identity) matrix
Static
TEMP_A temp matrix
Appends the given Matrix to this Matrix.
The matrix to append.
This matrix. Good for chaining method calls.
Get a new position with the current transformation applied. Can be used to go from a child's coordinate space to the world coordinate space. (e.g. rendering)
The origin
Optional
newPos: PThe point that the new position is assigned to (allowed to be same as input)
The new point, transformed through this matrix
Get a new position with the inverse of the current transformation applied. Can be used to go from the world coordinate space to a child's coordinate space. (e.g. input)
The origin
Optional
newPos: PThe point that the new position is assigned to (allowed to be same as input)
The new point, inverse-transformed through this matrix
Creates a new Matrix object with the same values as this one.
A copy of this matrix. Good for chaining method calls.
Changes the values of the matrix to be the same as the ones in given matrix
The matrix to copy from.
this
Creates a Matrix object based on the given array. The Element to Matrix mapping order is as follows:
a = array[0] b = array[1] c = array[3] d = array[4] tx = array[2] ty = array[5]
The array that the matrix will be populated from.
Resets this Matrix to an identity (default) matrix.
This matrix. Good for chaining method calls.
Inverts this matrix
This matrix. Good for chaining method calls.
Prepends the given Matrix to this Matrix.
The matrix to prepend
This matrix. Good for chaining method calls.
Applies a rotation transformation to the matrix.
The angle in radians.
This matrix. Good for chaining method calls.
Applies a scale transformation to the matrix.
The amount to scale horizontally
The amount to scale vertically
This matrix. Good for chaining method calls.
Sets the matrix properties.
Matrix component
Matrix component
Matrix component
Matrix component
Matrix component
Matrix component
This matrix. Good for chaining method calls.
Sets the matrix based on all the available properties
Position on the x axis
Position on the y axis
Pivot on the x axis
Pivot on the y axis
Scale on the x axis
Scale on the y axis
Rotation in radians
Skew on the x axis
Skew on the y axis
This matrix. Good for chaining method calls.
Creates an array from the current Matrix object.
Whether we need to transpose the matrix or not
Optional
out: Float32Array<ArrayBufferLike>If provided the array will be assigned to out
The newly created array which contains the matrix
Translates the matrix on the x and y.
How much to translate x by
How much to translate y by
This matrix. Good for chaining method calls.
The PixiJS Matrix as a class makes it a lot faster.
Here is a representation of it:
Memberof
PIXI