Implements a matrix.
Kind: global class
Matrix
Boolean
Matrix
Matrix
Matrix
Matrix
Matrix
Matrix
Matrix
Matrix
Matrix
Matrix
Matrix
Matrix
Vertex
Vector2
Vector3
Create 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
Matrix
Clone the matrix.
Kind: instance method of Matrix
Returns: Matrix
- Cloned matrix.
Boolean
Compare 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. |
An identity matrix.
Kind: static property of Matrix
Matrix
Create an orthographic projection matrix.
Kind: static method of Matrix
Returns: Matrix
- a new matrix with result.
Matrix
Create a perspective projection matrix.
Kind: static method of Matrix
Returns: Matrix
- a new matrix with result.
Matrix
Create a translation matrix.
Kind: static method of Matrix
Returns: Matrix
- a new matrix with result.
Matrix
Create a scale matrix.
Kind: static method of Matrix
Returns: Matrix
- a new matrix with result.
Matrix
Create a rotation matrix around X axis.
Kind: static method of Matrix
Returns: Matrix
- a new matrix with result.
Matrix
Create a rotation matrix around Y axis.
Kind: static method of Matrix
Returns: Matrix
- a new matrix with result.
Matrix
Create a rotation matrix around Z axis.
Kind: static method of Matrix
Returns: Matrix
- a new matrix with result.
Matrix
Multiply two matrices.
Kind: static method of Matrix
Returns: Matrix
- a new matrix with result.
Matrix
Creates 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. |
Matrix
Multiply 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. |
Matrix
Multiply two matrices and put result in first matrix.
Kind: static method of Matrix
Returns: Matrix
- matrixA, after it was modified.
Matrix
Multiply 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. |
Vertex
Transform 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. |
Vector2
Transform 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. |
Vector3
Transform 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. |