We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2faab9b commit c85f4c0Copy full SHA for c85f4c0
1 file changed
src/geom/Polygon.js
@@ -23,31 +23,7 @@ Phaser.Polygon = function (points) {
23
*/
24
this.type = Phaser.POLYGON;
25
26
- //if points isn't an array, use arguments as the array
27
- if (!(points instanceof Array))
28
- {
29
- points = Array.prototype.slice.call(arguments);
30
- }
31
-
32
- //if this is a flat array of numbers, convert it to points
33
- if (typeof points[0] === 'number')
34
35
- var p = [];
36
37
- for (var i = 0, len = points.length; i < len; i += 2)
38
39
- p.push(new Phaser.Point(points[i], points[i + 1]));
40
41
42
- points = p;
43
44
45
- /**
46
- * @property {array<Phaser.Point>|array<number>} points - The array of vertex Points.
47
- * @private
48
- */
49
- this._points = points;
50
+ this.points = points;
51
};
52
53
Phaser.Polygon.prototype = {
0 commit comments