Sets this Polygon to the given points.
The points can be set from a variety of formats:
'40 0 40 20 100 20 100 80 40 80 40 100 0 50'
[new Phaser.Point(x1, y1), ...]
[obj1, obj2, ...]
[x1,y1, x2,y2, ...]
[[x1, y1], [x2, y2], ...]
setTo
may also be called without any arguments to remove all points.
name | type | arguments | description |
---|---|---|---|
points | string | Array.<number> | Array.<Phaser.Types.Math.Vector2Like> | <optional> |
Points defining the perimeter of this polygon. Please check function description above for the different supported formats. |
This Polygon object.