Constructs a new Matrix3d object.
The values to initialize the matrix with.
Gets the tx component of the matrix.
The tx component of the matrix.
Gets the ty component of the matrix.
The ty component of the matrix.
Gets the tz component of the matrix.
The tz component of the matrix.
Apply a brightness adjustment.
brightness multiplier (1.0 = normal, >1 brighter, <1 darker)
this instance for chaining
Apply a contrast adjustment.
contrast multiplier (1.0 = normal, >1 more contrast, <1 less)
this instance for chaining
Copies over the values from another me.Matrix3d.
the matrix object to copy from
Reference to this object for method chaining
return true if the two matrices are identical
the other matrix
true if both are equals
Copies over the upper-left 2x2 values from the given me.Matrix2d
the matrix object to copy from
Reference to this object for method chaining
Apply a hue rotation.
rotation angle in radians
this instance for chaining
reset the transformation matrix to the identity matrix (no transformation).
the identity matrix and parameters position :

Reference to this object for method chaining
invert this matrix, causing it to apply the opposite transformation.
Reference to this object for method chaining
Apply a color inversion.
inversion amount (0.0 = original, 1.0 = fully inverted)
this instance for chaining
Check if the matrix is an identity matrix.
true if the matrix is an identity matrix
generate an orthogonal projection matrix, with the result replacing the current matrix

farthest left on the x-axis
farthest right on the x-axis
farthest down on the y-axis
farthest up on the y-axis
distance to the near clipping plane along the -Z axis
distance to the far clipping plane along the -Z axis
Reference to this object for method chaining
generate a perspective projection matrix, with the result replacing the current matrix
vertical field of view in radians
aspect ratio (width / height)
distance to the near clipping plane along the -Z axis
distance to the far clipping plane along the -Z axis
Reference to this object for method chaining
rotate this matrix (counter-clockwise) by the specified angle (in radians).
Rotation angle in radians.
Optionalv: Vector3dthe axis to rotate around (defaults to Z axis)
Reference to this object for method chaining
Apply a saturation adjustment.
saturation level (0.0 = grayscale, 1.0 = normal, >1 over-saturated)
this instance for chaining
scale the matrix
a number representing the abscissa of the scaling vector.
Optionaly: number = xa number representing the ordinate of the scaling vector.
Optionalz: number = 1a number representing the depth vector
Reference to this object for method chaining
adds a 2D scaling transformation.
scaling vector
Reference to this object for method chaining
specifies a 2D scale operation using the [sx, 1] scaling vector
x scaling vector
Reference to this object for method chaining
specifies a 2D scale operation using the [1,sy] scaling vector
y scaling vector
Reference to this object for method chaining
Apply a sepia tone.
sepia intensity (0.0 = original, 1.0 = full sepia)
this instance for chaining
Set the matrix to the specified value.
The matrix components.
Reference to this object for method chaining
return an array representation of this Matrix
internal matrix values
convert the object to a string representation
stringified representation
Multiplies the current transformation with a 2D affine matrix (a, b, c, d, e, f). The 2D matrix is promoted to 4x4 internally.
a component (scale x / cos)
b component (skew y / sin)
c component (skew x / -sin)
d component (scale y / cos)
e component (translate x)
f component (translate y)
Reference to this object for method chaining
Multiplies the current transformation with a full 4x4 matrix specified as 16 individual values (column-major).
Reference to this object for method chaining
translate the matrix position using the given vector
a number representing the abscissa of the vector, or a vector object
Optionaly: numbera number representing the ordinate of the vector.
Optionalz: numbera number representing the depth of the vector
Reference to this object for method chaining
A 4x4 color transformation matrix extending Matrix3d. Provides chainable methods for common color adjustments.
Example
Example