The DOMMatrixReadOnly
constructor creates a new DOMMatrixReadOnly
object which represents 4x4 matrices, suitable for 2D and 3D operations.
The DOMMatrixReadOnly
constructor creates a new DOMMatrixReadOnly
object which represents 4x4 matrices, suitable for 2D and 3D operations.
js
DOMMatrixReadOnly() DOMMatrixReadOnly(init)
init
Optional
Either a string containing a sequence of numbers or an array of numbers specifying the matrix you want to create.
In case an array of numbers is passed, the behavior depends on the length of the array:
[a, b, c, d, e, f]
, a 2D read-only matrix is created, initialized with the provided components.[m11, m12, m13, …, m42, m43, m44]
, a 3D read-only matrix is created, initialized with the provided components.Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
DOMMatrixReadOnly |
61 | 79 | 62 | No | 48 | 11 | 61 | 61 | 62 | 45 | 11 | 8.0 |
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/DOMMatrixReadOnly/DOMMatrixReadOnly