Skip to content

Commit 35dd98c

Browse files
committed
Added some docstring to the Polygon class
1 parent 06e33bc commit 35dd98c

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

src/geom/Polygon.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
/**
2+
* Creates a new Polygon. You have to provide a list of points
3+
* @class Phaser.Polygon
4+
* @classdesc The polygon represents a list of orderded points in space
5+
* @constructor
6+
* @param points* {Array<Point>|Array<Number>|Point...|Number...} This can be an array of Points that form the polygon,
7+
* a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arugments passed can be
8+
* all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the
9+
* arguments passed can be flat x,y values e.g. `new PIXI.Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are
10+
* Numbers.
11+
**/
112
Phaser.Polygon = function (points) {
213

314
PIXI.Polygon.call(this, points);

0 commit comments

Comments
 (0)