Create a new Mat3 instance. It is initialized to the identity matrix.
Matrix elements in the form of a flat array.
Static ReadonlyIDENTITYA constant matrix set to the identity.
Static ReadonlyZEROA constant matrix with all elements set to 0.
Reports whether two matrices are equal.
The other matrix.
True if the matrices are equal and false otherwise.
Copies the contents of a source array[9] to a destination 3x3 matrix.
An array[9] to be copied.
Self for chaining.
A 3x3 matrix. Mat3 is commonly used to represent rotation matrices, 2D transformations or the upper-left portion of a 4x4 matrix for transforming normals.
A new Mat3 is the identity. Elements live in data, a 9-element
Float32Arrayin column-major order, so the first three entries are the first column. Build one from a rotation with setFromQuat, or take the upper-left 3x3 of a Mat4 with setFromMat4, and apply it to a Vec3 with transformVector. getX, getY and getZ read the columns, which for a rotation matrix are its axes.Methods modify the matrix they are called on and return it for chaining. Use clone for an independent copy and copy to overwrite. IDENTITY and ZERO are frozen shared instances.
Example