new mat4()
Represents a 4x4 matrix stored in row-major order that uses Float32Arrays when available. Notes on Three.js matrix order: https://threejs.org/docs/index.html#api/en/math/Matrix4 For users, it looks like row-major order. It shouldn't matter if two type of matrix's array haven't been messed up. refrence algorithm: https://evanw.github.io/lightgl.js/docs/matrix.html
- Source:
Members
appAffine
Combine an affine transformation.
- Source:
i
Reset as indentity matrix
- Source:
js
Create a THREE.Matrix4 with the matrix.
- Source:
put2js
Set this matrix value to THREE.Matrix4, jsMatrix4.
- Source:
setByjs
Copy value without using 'new'.
- Source:
setByjs
Set THREE.Matrix4, jsMatrix4 to this matrix.
- Source:
Methods
inverse()
Returns the matrix that when multiplied with this matrix results in the identity matrix.
- Source:
mul(matrix) → {mat4}
Multiply by matrix to left
Parameters:
Name | Type | Description |
---|---|---|
matrix |
mat4 |
- Source:
Returns:
this
- Type
- mat4
mulpost(matrix) → {mat4}
Returns the concatenation of the transforms for this matrix and matrix. This emulates the OpenGL function glMultMatrix().
Parameters:
Name | Type | Description |
---|---|---|
matrix |
mat4 |
- Source:
Returns:
this
- Type
- mat4
transformPoint(v)
Transforms the vector as a point with a w coordinate of 1. This means translations will have an effect, for example. Noet: doubting that this should been replaced by vec3.transform(m4, w) and vec4.transform(m4).
Parameters:
Name | Type | Description |
---|---|---|
v |
vec3 |
- Source:
transpose()
Returns this matrix, exchanging columns for rows.
- Source:
(static) lookAt(ex, ey, ez, ex, ey, ez, ux, uy, uz, resultopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
ex |
number | ||
ey |
number | ||
ez |
number | ||
ex |
number | ||
ey |
number | ||
ez |
number | ||
ux |
number | ||
uy |
number | ||
uz |
number | ||
result |
mat4 |
<optional> |
- Source:
(static) nI()
negative I
- Source:
(static) rotate(a, x, y, z, resultopt)
Returns a matrix that rotates by a radian around the vector x, y, z. You can optionally pass an existing matrix in result to avoid allocating a new matrix. This emulates the OpenGL function glRotate().
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
a |
number | ||
x |
number | ||
y |
number | ||
z |
number | ||
result |
mat4 |
<optional> |
- Source: