DOMPointReadOnly()
DOMPointReadOnly()
コンストラクターは、スクリプトコードによってその値を変更できない、二次元または三次元の点を表す新しい DOMPointReadOnly
オブジェクト(オプションで遠近法を使用可能)を返します。
構文
new DOMPointReadOnly()
new DOMPointReadOnly(x)
new DOMPointReadOnly(x, y)
new DOMPointReadOnly(x, y, z)
new DOMPointReadOnly(x, y, z, w)
引数
返値
空間内の指定された位置を表す、新しい DOMPointReadOnly
オブジェクト。
例
次のコードは、二次元または三次元の点を作成する例です。
var point2D = new DOMPointReadOnly(50, 25);
var point3D = new DOMPointReadOnly(50, 0, 10);
var perspectivePoint3D = new DOMPointReadOnly(50, 50, 25, 0.5);
仕様書
Specification |
---|
Geometry Interfaces Module Level 1 # dom-dompointreadonly-dompointreadonly |
ブラウザーの互換性
BCD tables only load in the browser