Optionala: numberThe Scale X value. Default 1.
Optionalb: numberThe Skew Y value. Default 0.
Optionalc: numberThe Skew X value. Default 0.
Optionald: numberThe Scale Y value. Default 1.
Optionaltx: numberThe Translate X value. Default 0.
Optionalty: numberThe Translate Y value. Default 0.
The Scale X value.
The Skew Y value.
The Skew X value.
The Scale Y value.
The decomposed matrix.
The Translate X value.
The Translate Y value.
The matrix values.
The temporary quad value cache.
ReadonlyrotationThe rotation of the Matrix. Value is in radians.
ReadonlyrotationThe rotation of the Matrix, normalized to be within the Phaser right-handed clockwise rotation space. Value is in radians.
ReadonlyscaleThe decomposed horizontal scale of the Matrix. This value is always positive.
ReadonlyscaleThe decomposed vertical scale of the Matrix. This value is always positive.
The Translate X value.
The Translate Y value.
Apply the identity, translate, rotate and scale operations on the Matrix.
The horizontal translation.
The vertical translation.
The angle of rotation in radians.
The horizontal scale.
The vertical scale.
Set the values of this Matrix to copy those of the matrix given.
The source Matrix to copy from.
Set the values of this Matrix to copy those of the array given. Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.
The array of values to set into this matrix.
Copy the values in this Matrix to the array given.
Where array indexes 0, 1, 2, 3, 4 and 5 are mapped to a, b, c, d, e and f.
Optionalout: any[]The array to copy the matrix values in to.
Copy the values from this Matrix to the given Canvas Rendering Context. This will use the Context.transform method.
The Canvas Rendering Context to copy the matrix values to.
Set the values of this Matrix to copy those of the matrix given, combined with a camera scroll factor.
This is used in many render functions.
The source Matrix to copy from.
The horizontal scroll value to factor in.
The vertical scroll value to factor in.
The horizontal scroll factor to apply.
The vertical scroll factor to apply.
Decompose this Matrix into its translation, scale and rotation values using QR decomposition.
The result must be applied in the following order to reproduce the current matrix:
translate -> rotate -> scale
Destroys this Transform Matrix.
Returns a string that can be used in a CSS Transform call as a matrix property.
Returns the X component of this matrix multiplied by the given values.
This is the same as x * a + y * c + e.
The x value.
The y value.
Returns the X component of this matrix multiplied by the given values.
This is the same as x * a + y * c + e, optionally passing via Math.round.
The x value.
The y value.
Optionalround: booleanMath.round the resulting value? Default false.
Returns the Y component of this matrix multiplied by the given values.
This is the same as x * b + y * d + f.
The x value.
The y value.
Returns the Y component of this matrix multiplied by the given values.
This is the same as x * b + y * d + f, optionally passing via Math.round.
The x value.
The y value.
Optionalround: booleanMath.round the resulting value? Default false.
Invert the Matrix.
Reset the Matrix to an identity matrix.
Multiply this Matrix by the given Matrix.
If an out Matrix is given then the results will be stored in it.
If it is not given, this matrix will be updated in place instead.
Use an out Matrix if you do not wish to mutate this matrix.
The Matrix to multiply by.
Optionalout: TransformMatrixAn optional Matrix to store the results in.
Multiply this Matrix by the matrix given, including the offset.
The offsetX is added to the tx value: offsetX * a + offsetY * c + tx.
The offsetY is added to the ty value: offsetY * b + offsetY * d + ty.
The source Matrix to copy from.
Horizontal offset to factor in to the multiplication.
Vertical offset to factor in to the multiplication.
Rotate the Matrix.
The angle of rotation in radians.
Scale the Matrix.
The horizontal scale value.
The vertical scale value.
Performs the 8 calculations required to create the vertices of a quad based on this matrix and the given vertex coordinates.
The result is stored in TransformMatrix.quad, which is returned
from this method.
The x value of the top-left vertex of the quad.
The y value of the top-left vertex of the quad.
The x value of the bottom-right vertex of the quad. This is the x + width.
The y value of the bottom-right vertex of the quad. This is the y + height.
Optionalquad: Float32ArrayOptional Float32Array to store the results in. Otherwises uses the local quad array.
Copy the values from this Matrix to the given Canvas Rendering Context. This will use the Context.setTransform method.
The Canvas Rendering Context to copy the matrix values to.
Set the values of this Matrix.
The Scale X value.
The Shear Y value.
The Shear X value.
The Scale Y value.
The Translate X value.
The Translate Y value.
Transform the Matrix.
The Scale X value.
The Shear Y value.
The Shear X value.
The Scale Y value.
The Translate X value.
The Translate Y value.
Transform a point in to the local space of this Matrix.
The x coordinate of the point to transform.
The y coordinate of the point to transform.
Optionalpoint: Vector2LikeOptional Point object to store the transformed coordinates in.
Translate the Matrix.
The horizontal translation value.
The vertical translation value.
A Matrix used for display transformations for rendering.
It is represented like so: