DOMMatrixReadOnly
The DOMMatrixReadOnly
interface represents a read-only 4×4 matrix, suitable for 2D and 3D operations.
Inheritors
Properties
The readonly isIdentity
property of the DOMMatrixReadOnly interface is a Boolean whose value is true
if the matrix is the identity matrix.
Functions
The multiply()
method of the DOMMatrixReadOnly interface creates and returns a new matrix which is the dot product of the matrix and the otherMatrix
parameter.
The rotateAxisAngle()
method of the DOMMatrixReadOnly interface returns a new DOMMatrix created by rotating the source matrix by the given vector and angle.
The rotateFromVector()
method of the DOMMatrixReadOnly interface is returns a new DOMMatrix created by rotating the source matrix by the angle between the specified vector and (1, 0)
.
The scale()
method of the original matrix with a scale transform applied.
The scale3d()
method of the DOMMatrixReadOnly interface creates a new matrix which is the result of a 3D scale transform being applied to the matrix.
The toFloat32Array()
method of the DOMMatrixReadOnly interface returns a new Float32Array containing all 16 elements (m11
, m12
, m13
, m14
, m21
, m22
, m23
, m24
, m31
, m32
, m33
, m34
, m41
, m42
, m43
, m44
) which comprise the matrix.
The toFloat64Array()
method of the DOMMatrixReadOnly interface returns a new Float64Array containing all 16 elements (m11
, m12
, m13
, m14
, m21
, m22
, m23
, m24
, m31
, m32
, m33
, m34
, m41
, m42
, m43
, m44
) which comprise the matrix.
The transformPoint
method of the You can also create a new DOMPoint
by applying a matrix to a point with the DOMPointReadOnly.matrixTransform() method.