-
-
Duplicates a Matrix3 instance.
Returns:
-
-
Copy matrix.
Name |
Type |
Description |
a |
Mat3
|
Matrix to copy. |
-
eulerToMatrix(ax, ay, az){Mat4}
-
Sets current rotation matrix by euler's angles.
Name |
Type |
Description |
ax |
number
|
Rotation angle in radians arond X axis. |
ay |
number
|
Rotation angle in radians arond Y axis. |
az |
number
|
Rotation angle in radians arond Z axis. |
Returns:
-
-
Creates an inversed matrix of the current.
Returns:
-
-
Computes the product of two matrices.
Name |
Type |
Description |
mx |
Mat4
|
Matrix to multiply. |
Returns:
-
-
Multiply to 3d vector.
Name |
Type |
Description |
p |
Vec3
|
3d vector. |
Returns:
-
-
Multiply to 4d vector.
Name |
Type |
Description |
p |
Vec4
|
4d vector. |
Returns:
-
-
Rotate currrent matrix around the aligned axis and angle.
Name |
Type |
Description |
u |
Vec3
|
Aligned axis. |
angle |
number
|
Aligned axis angle in radians. |
Returns:
-
rotateBetweenVectors(a, b){Mat4}
-
Gets the rotation matrix from one vector to another.
Name |
Type |
Description |
a |
Vec3
|
Firtst vector. |
b |
Vec3
|
Second vector. |
Returns:
-
-
Scale current matrix to the vector values.
Name |
Type |
Description |
v |
Vec3
|
Scale vector. |
Returns:
-
-
Sets column-major order array matrix.
Name |
Type |
Description |
m |
Array.<number>
|
Matrix array. |
Returns:
-
-
Sets matrix to identity.
Returns:
-
setOrtho(left, right, bottom, top, near, far){Mat4}
-
Creates current orthographic projection matrix.
Name |
Type |
Description |
left |
number
|
- |
right |
number
|
- |
bottom |
number
|
- |
top |
number
|
- |
near |
number
|
- |
far |
number
|
- |
Returns:
-
setPerspective(left, right, bottom, top, near, far){Mat4}
-
Sets perspective projection matrix frustum values.
Name |
Type |
Description |
left |
number
|
- |
right |
number
|
- |
bottom |
number
|
- |
top |
number
|
- |
near |
number
|
- |
far |
number
|
- |
Returns:
-
setRotation(u, angle){Mat4}
-
Sets current rotation matrix around the aligned axis and angle.
Name |
Type |
Description |
u |
Vec3
|
Aligned axis. |
angle |
number
|
Aligned axis angle in radians. |
Returns:
-
-
Creates an inversed 3x3 matrix of the current.
Returns:
-
-
Converts to 3x3 matrix.
Returns:
-
-
Add translation vector to the current matrix.
Name |
Type |
Description |
v |
Vec3
|
Translate vector. |
Returns:
-
translateToPosition(v){Mat4}
-
Sets translation matrix to the position.
Name |
Type |
Description |
v |
Vec3
|
Translate to position. |
Returns:
-
-
Creates a trasposed matrix of the current.
Returns:
-
staticMat4.identity(){Mat4}
-
Returns identity matrix instance.
Returns: