Mat4 constructor
Initial array to use, default to identity matrix.
The type of the Mat4.
Our matrix array.
Sets the matrix from 16 numbers.
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
number
Sets the Mat4 values from an array.
Array to use.
Optional offset in the array to use.
Rotate a Mat4 from a quaternion.
quaternion to use.
Creates a Mat4 from a quaternion rotation, vector translation and vector scale. Equivalent for applying translation, rotation and scale matrices but much faster. Source code from: http://glmatrix.net/docs/mat4.js.html
Creates a Mat4 from a quaternion rotation, vector translation and vector scale, rotating and scaling around the given origin vector. Equivalent for applying translation, rotation and scale matrices but much faster. Source code from: http://glmatrix.net/docs/mat4.js.html
position vector of the object that should be rotated.
target vector to look at.
Up vector.
Create an orthographic Mat4 matrix based on the parameters. Transforms from
parameters used to create the camera orthographic matrix.
Create a perspective Mat4 matrix based on the parameters.
Note, The matrix generated sends the viewing frustum to the unit box. We assume a unit box extending from -1 to 1 in the x and y dimensions and from -1 to 1 in the z dimension, as three.js and more generally WebGL handles it.
parameters used to create the camera perspective matrix.
Basic 4x4 matrix class used for matrix calculations.
Note that like three.js, the constructor and set method take arguments in row-major order, while internally they are stored in the elements array in column-major order.
See