Point.parse()

<static> parse(obj, xProp, yProp) → {Phaser.Point}

Parses an object for x and/or y properties and returns a new Phaser.Point with matching values.
If the object doesn't contain those properties a Point with x/y of zero will be returned.

Parameters
Name Type Argument Default Description
obj object

The object to parse.

xProp string <optional>
'x'

The property used to set the Point.x value.

yProp string <optional>
'y'

The property used to set the Point.y value.

Returns

The new Point object.

Source code: geom/Point.js (Line 873)
doc_phaser
2017-02-14 11:05:46
Comments
Leave a Comment

Please login to continue.