Creates a new Matrix33 instance.
Float32Array containing 9 matrix values in column-major order
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
StaticdummyCreates a dummy matrix with empty data array. Used for placeholder purposes.
A new Matrix33 with empty Float32Array
StaticfromCreates 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
StaticfromCreates 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
StaticfromStaticfromStaticfromCreates a Matrix33 from a regular array in column-major order.
The array containing at least 9 numbers
A new Matrix33 instance
StaticfromCreates 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
StaticfromCreates a Matrix33 by copying from a Float32Array in column-major order.
The Float32Array to copy from
A new Matrix33 instance
StaticfromCreates a Matrix33 by copying from a Float32Array in row-major order.
The Float32Array in row-major order
A new Matrix33 instance
StaticfromStaticfromStaticfromCreates a Matrix33 from a quaternion representing rotation.
The quaternion to convert
A new Matrix33 representing the rotation
StaticfromCreates a Matrix33 using the provided Float32Array directly (no copy).
The Float32Array in column-major order
A new Matrix33 instance
StaticidentityCreates an identity matrix.
A new identity matrix (optimized IdentityMatrix33 instance)
StaticinvertStaticinvertCalculates the inverse of the given matrix and stores the result in the output matrix.
The matrix to invert
The output mutable matrix to store the result
The output matrix containing the inverted matrix
StaticmultiplyStaticmultiplyMultiplies 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
StaticrotateStaticrotateCreates a rotation matrix around the X-axis.
The rotation angle in radians
A new rotation matrix
StaticrotateCreates 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
StaticrotateCreates a rotation matrix around the Y-axis.
The rotation angle in radians
A new rotation matrix
StaticrotateCreates a rotation matrix around the Z-axis.
The rotation angle in radians
A new rotation matrix
StaticscaleStatictransposeStaticzero
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