Get to know MDN better
このページはコミュニティーの尽力で英語から翻訳されました。MDN Web Docs コミュニティーについてもっと知り、仲間になるにはこちらから。
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2020年1月.
メモ: この機能はウェブワーカー内で利用可能です。
DOMMatrixReadOnly コンストラクターは新しい DOMMatrixReadOnly オブジェクトを作成します。このオブジェクトは 4x4 の行列を表し、 2D および 3D の演算に適しています。
CSS の matrix() または matrix3d() の形式で 2D または 3D の行列を表す文字列です。
initArray 省略可列優先順で 6 または 16 個の数値を含む配列。それ以外の長さの配列では TypeError が発生します。
この引数が省略された場合、恒等行列が作成されます。すなわち、[1, 0, 0, 1, 0, 0] と同等です。
この引数が Float32Array または Float64Array で提供される場合は、より高性能な静的メソッドである DOMMatrixReadOnly.fromFloat32Array() または DOMMatrixReadOnly.fromFloat64Array() を代わりに使用することを検討してください。
新しい DOMMatrixReadOnly オブジェクトです。
引数が文字列でない場合、または長さが 6 または 16 以外の配列である場合に発生します。
SyntaxError文字列引数が有効な CSS の matrix() または matrix3d() 形式でない場合に発生します。
| Geometry Interfaces Module Level 1 # dom-dommatrixreadonly-dommatrixreadonly |
Enable JavaScript to view this browser compatibility table.
This page was last modified on 2026年2月16日 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.