Skip to content

Matrix3

new Matrix3(elements?)

THREE equivalent: THREE.Matrix3

Column-major 3x3 matrix backed by a Float32Array. Used for normal matrices and 2D transforms.

Differs from THREE.js

multiply() is named mul(). Supports compose/decompose for 2D transforms.

Name Type Description
elements Float32Array Flat 9-element column-major storage.
Method Description
identity(): this Resets to the identity matrix.
getNormalMatrix(m: Matrix4): this Sets this to the transposed inverse of the upper-left 3x3 of the given Matrix4.
setFromMatrix4(m: Matrix4): this Copies the upper-left 3x3 from a Matrix4.
invert(): this Inverts the matrix in place.
mul(m: Matrix3): this Post-multiplies this matrix by m.
determinant(): number Returns the determinant.
clone(): Matrix3 Returns a new Matrix3 with the same elements.