Class: Point

BrowserEventTranslator.Point()

new Point()

2次元座標
Properties:
Name Type Description
x number
y number
Source:

Methods

(static) fromDict(dict) → {BrowserEventTranslator.Point}

x,yの辞書からPoint objectに変換する
Parameters:
Name Type Description
dict Object
Source:
Returns:
Type
BrowserEventTranslator.Point

(static) fromEvent(ev) → {BrowserEventTranslator.Point}

PointerEventないしMouseEventからPoint objectに変換する
Parameters:
Name Type Description
ev UIEvent
Source:
Returns:
Type
BrowserEventTranslator.Point

(static) fromTouch(touch) → {BrowserEventTranslator.Point}

TouchEvent#touchesに格納されているTouchからPoint objectに変換する
Parameters:
Name Type Description
touch Touch
Source:
Returns:
Type
BrowserEventTranslator.Point

clone() → {BrowserEventTranslator.Point}

自身の複製を返す
Source:
Returns:
Type
BrowserEventTranslator.Point

distance(otherPoint) → {number}

2点間の距離を取得する
Parameters:
Name Type Description
otherPoint BrowserEventTranslator.Point
Source:
Returns:
Type
number

toDict() → {Object}

同じ座標情報を持った辞書を返す
Source:
Returns:
Type
Object