Skip to content

Commit 37c9b08

Browse files
committed
Updated Polygon points type. Fix phaserjs#5357
1 parent 8a01ae1 commit 37c9b08

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/geom/polygon/Polygon.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var GEOM_CONST = require('../const');
1414
* A Polygon object
1515
*
1616
* The polygon is a closed shape consists of a series of connected straight lines defined by list of ordered points.
17-
* Several formats are supported to define the list of points, check the setTo method for details.
17+
* Several formats are supported to define the list of points, check the setTo method for details.
1818
* This is a geometry object allowing you to define and inspect the shape.
1919
* It is not a Game Object, in that you cannot add it to the display list, and it has no texture.
2020
* To render a Polygon you should look at the capabilities of the Graphics class.
@@ -24,7 +24,7 @@ var GEOM_CONST = require('../const');
2424
* @constructor
2525
* @since 3.0.0
2626
*
27-
* @param {Phaser.Geom.Point[]} [points] - List of points defining the perimeter of this Polygon. Several formats are supported:
27+
* @param {(string|number[]|Phaser.Types.Math.Vector2Like[]|Array<Array<[number]>>)} [points] - List of points defining the perimeter of this Polygon. Several formats are supported:
2828
* - A string containing paired x y values separated by a single space: `'40 0 40 20 100 20 100 80 40 80 40 100 0 50'`
2929
* - An array of Point objects: `[new Phaser.Point(x1, y1), ...]`
3030
* - An array of objects with public x y properties: `[obj1, obj2, ...]`
@@ -105,7 +105,7 @@ var Polygon = new Class({
105105
* @method Phaser.Geom.Polygon#setTo
106106
* @since 3.0.0
107107
*
108-
* @param {array} points - Points defining the perimeter of this polygon. Please check function description above for the different supported formats.
108+
* @param {(string|number[]|Phaser.Types.Math.Vector2Like[]|Array<Array<[number]>>)} [points] - Points defining the perimeter of this polygon. Please check function description above for the different supported formats.
109109
*
110110
* @return {this} This Polygon object.
111111
*/

0 commit comments

Comments
 (0)