Members
#
_dirty :boolean
- Source:
Type:
#
array :Float32Array
- Source:
Type:
#
decomposeMatrix
- Source:
- See:
-
Decompose a matrix to SRT
- Source:
X Axis of local transform
Type:
- Source:
Y Axis of local transform
Type:
- Source:
Z Axis of local transform
Type:
Methods
- Source:
Calculate the adjugate of self, in-place
Returns:
-
Type
-
clay.Matrix4
- Source:
Returns:
-
Type
-
clay.Matrix4
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
determinant() → {number}
- Source:
Calculate matrix determinant
Returns:
-
Type
-
number
- Source:
Set from Matrix2d, it is used when converting a 2d shape to 3d space.
In 3d space it is equivalent to ranslate on xy plane and rotate about z axis
Parameters:
Returns:
-
Type
-
clay.Matrix4
- Source:
Set upper 3x3 part from quaternion
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
fromRotationTranslation(q, v) → {clay.Matrix4}
- Source:
Set from a quaternion rotation and a vector translation
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
frustum(left, right, bottom, top, near, far) → {clay.Matrix4}
- Source:
Parameters:
| Name |
Type |
Description |
left |
number
|
|
right |
number
|
|
bottom |
number
|
|
top |
number
|
|
near |
number
|
|
far |
number
|
|
Returns:
-
Type
-
clay.Matrix4
- Source:
Returns:
-
Type
-
clay.Matrix4
- Source:
Returns:
-
Type
-
clay.Matrix4
#
lookAt(eye, center, up) → {clay.Matrix4}
- Source:
Set as a matrix with the given eye position, focal point, and up axis
Parameters:
Returns:
-
Type
-
clay.Matrix4
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
- Source:
Multiply a and self, a is on the left
Parameters:
Returns:
-
Type
-
clay.Matrix3
#
ortho(left, right, bottom, top, near, far) → {clay.Matrix4}
- Source:
Set as a orthographic projection matrix
Parameters:
| Name |
Type |
Description |
left |
number
|
|
right |
number
|
|
bottom |
number
|
|
top |
number
|
|
near |
number
|
|
far |
number
|
|
Returns:
-
Type
-
clay.Matrix4
#
perspective(fovy, aspect, near, far) → {clay.Matrix4}
- Source:
Set as a perspective projection matrix
Parameters:
| Name |
Type |
Description |
fovy |
number
|
|
aspect |
number
|
|
near |
number
|
|
far |
number
|
|
Returns:
-
Type
-
clay.Matrix4
- Source:
Rotate self by rad about axis.
Equal to right-multiply a rotaion matrix
Parameters:
Returns:
-
Type
-
clay.Matrix4
- Source:
Rotate self by a given radian about X axis.
Equal to right-multiply a rotaion matrix
Parameters:
| Name |
Type |
Description |
rad |
number
|
|
Returns:
-
Type
-
clay.Matrix4
- Source:
Rotate self by a given radian about Y axis.
Equal to right-multiply a rotaion matrix
Parameters:
| Name |
Type |
Description |
rad |
number
|
|
Returns:
-
Type
-
clay.Matrix4
- Source:
Rotate self by a given radian about Z axis.
Equal to right-multiply a rotaion matrix
Parameters:
| Name |
Type |
Description |
rad |
number
|
|
Returns:
-
Type
-
clay.Matrix4
- Source:
Scale self by s
Equal to right-multiply a scale matrix
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
setArray(arr)
- Source:
Set components from array
Parameters:
| Name |
Type |
Description |
arr |
Float32Array
|
Array.<number>
|
|
- Source:
Translate self by v.
Equal to right-multiply a translate matrix
Parameters:
Returns:
-
Type
-
clay.Matrix4
- Source:
Transpose self, in-place.
Returns:
-
Type
-
clay.Matrix2
#
(static) adjoint(out, a) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
(static) copy(out, a) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
(static) determinant(a) → {number}
- Source:
Parameters:
Returns:
-
Type
-
number
#
(static) fromMat2d(m4, m2d) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
(static) fromQuat(out, q) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
(static) fromRotationTranslation(out, q, v) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
(static) identity(out) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
(static) invert(out, a) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
(static) lookAt(out, eye, center, up) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
(static) mul(out, a, b) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
(static) multiply(out, a, b) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
(static) ortho(out, left, right, bottom, top, near, far) → {clay.Matrix4}
- Source:
Parameters:
| Name |
Type |
Description |
out |
clay.Matrix4
|
|
left |
number
|
|
right |
number
|
|
bottom |
number
|
|
top |
number
|
|
near |
number
|
|
far |
number
|
|
Returns:
-
Type
-
clay.Matrix4
#
(static) perspective(out, fovy, aspect, near, far) → {clay.Matrix4}
- Source:
Parameters:
| Name |
Type |
Description |
out |
clay.Matrix4
|
|
fovy |
number
|
|
aspect |
number
|
|
near |
number
|
|
far |
number
|
|
Returns:
-
Type
-
clay.Matrix4
#
(static) rotate(out, a, rad, axis) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
(static) rotateX(out, a, rad) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
(static) rotateY(out, a, rad) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
(static) rotateZ(out, a, rad) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
(static) scale(out, a, v) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
(static) translate(out, a, v) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4
#
(static) transpose(out, a) → {clay.Matrix4}
- Source:
Parameters:
Returns:
-
Type
-
clay.Matrix4