mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 12:43:26 +00:00
Updated Polygon points type. Fix #5357
This commit is contained in:
parent
8a01ae1cb7
commit
37c9b0884d
1 changed files with 3 additions and 3 deletions
|
@ -14,7 +14,7 @@ var GEOM_CONST = require('../const');
|
|||
* A Polygon object
|
||||
*
|
||||
* The polygon is a closed shape consists of a series of connected straight lines defined by list of ordered points.
|
||||
* Several formats are supported to define the list of points, check the setTo method for details.
|
||||
* Several formats are supported to define the list of points, check the setTo method for details.
|
||||
* This is a geometry object allowing you to define and inspect the shape.
|
||||
* It is not a Game Object, in that you cannot add it to the display list, and it has no texture.
|
||||
* To render a Polygon you should look at the capabilities of the Graphics class.
|
||||
|
@ -24,7 +24,7 @@ var GEOM_CONST = require('../const');
|
|||
* @constructor
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {Phaser.Geom.Point[]} [points] - List of points defining the perimeter of this Polygon. Several formats are supported:
|
||||
* @param {(string|number[]|Phaser.Types.Math.Vector2Like[]|Array<Array<[number]>>)} [points] - List of points defining the perimeter of this Polygon. Several formats are supported:
|
||||
* - 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'`
|
||||
* - An array of Point objects: `[new Phaser.Point(x1, y1), ...]`
|
||||
* - An array of objects with public x y properties: `[obj1, obj2, ...]`
|
||||
|
@ -105,7 +105,7 @@ var Polygon = new Class({
|
|||
* @method Phaser.Geom.Polygon#setTo
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param {array} points - Points defining the perimeter of this polygon. Please check function description above for the different supported formats.
|
||||
* @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.
|
||||
*
|
||||
* @return {this} This Polygon object.
|
||||
*/
|
||||
|
|
Loading…
Reference in a new issue