Creates a new Matrix33_ instance.
Typed array containing 9 matrix values in column-major order
Configuration object containing the typed array constructor
Gets the class name.
The string "Matrix33"
Gets the matrix as a GLSL mat3 string with float precision.
GLSL mat3 constructor string
Gets the matrix as a GLSL mat3 string with integer values.
GLSL mat3 constructor string with floored values
Indicates whether this matrix is an identity matrix class.
This property should be overridden in derived classes that represent identity matrices to return true.
False for the base AbstractMatrix class
Gets the matrix element at row 0, column 0.
The m00 component
Gets the matrix element at row 0, column 1.
The m01 component
Gets the matrix element at row 0, column 2.
The m02 component
Gets the matrix element at row 1, column 0.
The m10 component
Gets the matrix element at row 1, column 1.
The m11 component
Gets the matrix element at row 1, column 2.
The m12 component
Gets the matrix element at row 2, column 0.
The m20 component
Gets the matrix element at row 2, column 1.
The m21 component
Gets the matrix element at row 2, column 2.
The m22 component
Gets the matrix as a WGSL mat3x3f string with float precision.
WGSL mat3x3f constructor string
Gets the matrix as a WGSL mat3x3i string with integer values.
WGSL mat3x3i constructor string with floored values
StaticcompositionGets the composition type for this matrix.
CompositionType.Mat3
Gets the matrix element at the specified row and column.
The row index (0-2)
The column index (0-2)
The matrix element at the specified position
Creates a deep copy of this matrix.
A new Matrix33 instance with the same values
Calculates the determinant of this matrix.
The determinant value
Converts the matrix to a flat array in column-major order.
An array containing all 9 matrix elements
Extracts the scale factors from this matrix.
A new Vector3 containing the scale factors for each axis
Extracts the scale factors from this matrix and stores them in an output vector.
The output mutable vector to store the scale factors
The output vector containing the scale factors
Checks if this matrix is a dummy matrix (empty data array).
True if the matrix has no data, false otherwise
Checks if this matrix is approximately equal to another matrix.
The matrix to compare with
The tolerance for comparison (default: Number.EPSILON)
True if matrices are approximately equal, false otherwise
Checks if this matrix is strictly equal to another matrix.
The matrix to compare with
True if all elements are exactly equal, false otherwise
Checks if the matrix's internal storage shares the same ArrayBuffer as the provided one.
This method is useful for determining if two matrices share the same underlying memory, which can be important for performance optimizations and avoiding unnecessary data copying.
The ArrayBuffer to compare against
True if the internal storage uses the same ArrayBuffer, false otherwise
Multiplies this matrix with a vector.
The vector to multiply
A new vector representing the result of matrix * vector
Multiplies this matrix with a vector and stores the result in an output vector.
The vector to multiply
The output mutable vector to store the result
The output vector containing the result of matrix * vector
Converts the matrix to a human-readable string representation.
A formatted string showing the matrix in 3x3 layout
Converts the matrix to a human-readable string with rounded values.
A formatted string showing the matrix with financially rounded values
Gets the matrix element at the specified index in the internal array.
The index (0-8)
The matrix element at the specified index
Static_Creates a dummy matrix with empty data array. Used for placeholder purposes.
A new Matrix33 with empty Float32Array
Static_Creates a Matrix33 from 9 values in column-major order.
Element at row 0, column 0
Element at row 1, column 0
Element at row 2, column 0
Element at row 0, column 1
Element at row 1, column 1
Element at row 2, column 1
Element at row 0, column 2
Element at row 1, column 2
Element at row 2, column 2
A new Matrix33 instance
Static_Creates a Matrix33 from 9 values in row-major order. Values are stored internally in column-major order for WebGL compatibility.
Element at row 0, column 0
Element at row 0, column 1
Element at row 0, column 2
Element at row 1, column 0
Element at row 1, column 1
Element at row 1, column 2
Element at row 2, column 0
Element at row 2, column 1
Element at row 2, column 2
A new Matrix33 instance
Static_Creates a Matrix33 from an Array9 in column-major order.
The Array9 containing 9 numbers
A new Matrix33 instance
Static_Creates a Matrix33 from an Array9 in row-major order.
The Array9 containing 9 numbers in row-major order
A new Matrix33 instance
Static_Creates a Matrix33 from a regular array in column-major order.
The array containing at least 9 numbers
A new Matrix33 instance
Static_Creates a Matrix33 from a regular array in row-major order.
The array containing at least 9 numbers in row-major order
A new Matrix33 instance
Static_Creates a Matrix33 by copying from another IMatrix33.
The matrix to copy from
A new Matrix33 instance
Static_Creates a Matrix33 from the upper-left 3x3 portion of a Matrix44.
The Matrix44 to extract from
A new Matrix33 instance
Static_Creates a Matrix33 from a quaternion representing rotation.
The quaternion to convert
A new Matrix33 representing the rotation
Static_Creates a Matrix33 by copying from a Float32Array in column-major order.
A new Matrix33 instance
Static_Creates a Matrix33 by copying from a Float32Array in row-major order.
The Float32Array in row-major order
A new Matrix33 instance
Static_Creates a Matrix33 using the provided Float32Array directly (no copy).
A new Matrix33 instance
Static_Creates an identity matrix.
A new identity matrix (optimized IdentityMatrix33 instance)
Static_Creates the inverse of the given matrix.
If the matrix is numerically singular, an identity matrix is returned instead of dividing by zero. Use Matrix33.tryInvert when the caller needs to detect the failure.
The matrix to invert
A new inverted matrix, or the identity matrix if the input is singular
Static_Calculates the inverse of the given matrix and stores the result in the output matrix.
If the matrix is numerically singular, the output matrix is set to the
identity matrix instead of being filled with Infinity/NaN.
Use Matrix33.tryInvertTo when the caller needs to detect the failure.
The matrix to invert
The output mutable matrix to store the result
The output matrix containing the inverted matrix, or the identity matrix if the input is singular
Static_Multiplies two matrices together.
The left matrix
The right matrix
A new matrix representing l_mat * r_mat
Static_Multiplies two matrices and stores the result in an output matrix.
The left matrix
The right matrix
The output mutable matrix to store the result
The output matrix containing l_mat * r_mat
Static_Creates a rotation matrix from a Vector3 containing Euler angles.
Vector3 containing rotation angles (x, y, z) in radians
A new rotation matrix
Static_Creates a rotation matrix around the X-axis.
The rotation angle in radians
A new rotation matrix
Static_Creates a rotation matrix from Euler angles in XYZ order.
Rotation around X-axis in radians
Rotation around Y-axis in radians
Rotation around Z-axis in radians
A new rotation matrix representing the combined rotations
Static_Creates a rotation matrix around the Y-axis.
The rotation angle in radians
A new rotation matrix
Static_Creates a rotation matrix around the Z-axis.
The rotation angle in radians
A new rotation matrix
Static_Creates a scaling matrix.
Vector3 containing scale factors for each axis
A new scaling matrix
Static_Creates the transpose of the given matrix.
The matrix to transpose
A new transposed matrix
Static_Attempts to create the inverse of the given matrix.
Returns null instead of dividing by zero when the matrix is numerically singular (see MathUtil.isSingularDet).
The matrix to invert
A new inverted matrix, or null if the matrix is not invertible
Static_Attempts to calculate the inverse of the given matrix and stores the result in the output matrix. The output matrix is left untouched when the input is numerically singular.
The matrix to invert
The output mutable matrix to store the result
True if the inversion succeeded, false if the matrix is singular
Static_Creates a zero matrix (all elements are 0).
A new Matrix33 with all zero elements
Immutable 3x3 matrix class for 3D transformations. Matrix values are stored in column-major order for WebGL compatibility. Provides various matrix operations including rotation, scaling, and multiplication.
Example