
Implements a matrix.
Kind: global class
MatrixBooleanMatrixMatrixVector2 | Vector3 | Vector3MatrixMatrixMatrixMatrixMatrixMatrixMatrixMatrixMatrixMatrixMatrixMatrixMatrixMatrixVertexVector2Vector3Create the matrix.
| Param | Description |
|---|---|
| values | matrix values array. |
| cloneValues | if true or undefined, will clone values instead of just holding a reference to them. |
Set the matrix values.
Kind: instance method of Matrix
MatrixClone the matrix.
Kind: instance method of Matrix
Returns: Matrix - Cloned matrix.
BooleanCompare this matrix to another matrix.
Kind: instance method of Matrix
Returns: Boolean - If matrices are the same.
| Param | Type | Description |
|---|---|---|
| other | Matrix |
Matrix to compare to. |
MatrixClone and invert the matrix.
Kind: instance method of Matrix
Returns: Matrix - Clonsed inverted matrix.
MatrixInvert this matrix.
Kind: instance method of Matrix
Returns: Matrix - Self.
Vector2 | Vector3 | Vector3Transform a target.
Kind: instance method of Matrix
Returns: Vector2 | Vector3 | Vector3 - Transformed result.
| Param | Type | Description |
|---|---|---|
| target | Vector2 | Vector3 | Vertex |
Transforms a target, that can be vector2, vector3, or vertex. |
MatrixMultiply this matrix with another matrix, putting results in self.
Kind: instance method of Matrix
Returns: Matrix - This.
| Param | Type | Description |
|---|---|---|
| other | Matrix |
Matrix to multiply with. |
MatrixMultiply this matrix with another matrix and return a new result matrix.
Kind: instance method of Matrix
Returns: Matrix - New result matrix.
| Param | Type | Description |
|---|---|---|
| other | Matrix |
Matrix to multiply with. |
An identity matrix.
Kind: static property of Matrix
MatrixCreate an orthographic projection matrix.
Kind: static method of Matrix
Returns: Matrix - a new matrix with result.
MatrixCreate a perspective projection matrix.
Kind: static method of Matrix
Returns: Matrix - a new matrix with result.
MatrixCreate a translation matrix.
Kind: static method of Matrix
Returns: Matrix - a new matrix with result.
MatrixCreate a scale matrix.
Kind: static method of Matrix
Returns: Matrix - a new matrix with result.
MatrixCreate a rotation matrix around X axis.
Kind: static method of Matrix
Returns: Matrix - a new matrix with result.
MatrixCreate a rotation matrix around Y axis.
Kind: static method of Matrix
Returns: Matrix - a new matrix with result.
MatrixCreate a rotation matrix around Z axis.
Kind: static method of Matrix
Returns: Matrix - a new matrix with result.
MatrixMultiply two matrices.
Kind: static method of Matrix
Returns: Matrix - a new matrix with result.
MatrixCreates a look-at matrix - a matrix rotated to look at a given position.
Kind: static method of Matrix
Returns: Matrix - a new matrix with result.
| Param | Type | Description |
|---|---|---|
| eyePosition | Vector3 |
Eye position. |
| targetPosition | Vector3 |
Position the matrix should look at. |
| [upVector] | Vector3 |
Optional vector representing ‘up’ direction. |
MatrixMultiply an array of matrices.
Kind: static method of Matrix
Returns: Matrix - new matrix with multiply result.
| Param | Type | Description |
|---|---|---|
| matrices | Array.<Matrix> |
Matrices to multiply. |
MatrixMultiply two matrices and put result in first matrix.
Kind: static method of Matrix
Returns: Matrix - matrixA, after it was modified.
MatrixMultiply an array of matrices into the first matrix in the array.
Kind: static method of Matrix
Returns: Matrix - first matrix in array, after it was modified.
| Param | Type | Description |
|---|---|---|
| matrices | Array.<Matrix> |
Matrices to multiply. |
VertexTransform a 2d vertex.
Kind: static method of Matrix
Returns: Vertex - A transformed vertex (cloned, not the original).
| Param | Type | Description |
|---|---|---|
| matrix | Matrix |
Matrix to use to transform vector. |
| vertex | Vertex |
Vertex to transform. |
Vector2Transform a 2d vector.
Kind: static method of Matrix
Returns: Vector2 - Transformed vector.
| Param | Type | Description |
|---|---|---|
| matrix | Matrix |
Matrix to use to transform vector. |
| vector | Vector2 |
Vector to transform. |
Vector3Transform a 3d vector.
Kind: static method of Matrix
Returns: Vector3 - Transformed vector.
| Param | Type | Description |
|---|---|---|
| matrix | Matrix |
Matrix to use to transform vector. |
| vector | Vector3 |
Vector to transform. |