Skip to content

Commit 6e05e02

Browse files
author
Javier García Álvarez
committed
Added some documentation for Spline curves.
1 parent 5e027f7 commit 6e05e02

1 file changed

Lines changed: 12 additions & 12 deletions

File tree

src/curves/SplineCurve.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@ var Vector2 = require('../math/Vector2');
1313

1414
/**
1515
* @classdesc
16-
* [description]
16+
* Create a smooth 2d spline curve from a series of points.
1717
*
1818
* @class Spline
1919
* @extends Phaser.Curves.Curve
2020
* @memberof Phaser.Curves
2121
* @constructor
2222
* @since 3.0.0
2323
*
24-
* @param {Phaser.Math.Vector2[]} [points] - [description]
24+
* @param {(Phaser.Math.Vector2[]|number[]|number[][])} [points] - The points that configure the curve.
2525
*/
2626
var SplineCurve = new Class({
2727

@@ -36,7 +36,7 @@ var SplineCurve = new Class({
3636
Curve.call(this, 'SplineCurve');
3737

3838
/**
39-
* [description]
39+
* The Vector2 points that configure the curve.
4040
*
4141
* @name Phaser.Curves.Spline#points
4242
* @type {Phaser.Math.Vector2[]}
@@ -49,12 +49,12 @@ var SplineCurve = new Class({
4949
},
5050

5151
/**
52-
* [description]
52+
* Add a list of points to the current list of Vector2 points of the curve.
5353
*
5454
* @method Phaser.Curves.Spline#addPoints
5555
* @since 3.0.0
5656
*
57-
* @param {(Phaser.Math.Vector2[]|number[]|number[][])} points - [description]
57+
* @param {(Phaser.Math.Vector2[]|number[]|number[][])} points - The points that configure the curve.
5858
*
5959
* @return {Phaser.Curves.Spline} This curve object.
6060
*/
@@ -89,15 +89,15 @@ var SplineCurve = new Class({
8989
},
9090

9191
/**
92-
* [description]
92+
* Add a point to the current list of Vector2 points of the curve.
9393
*
9494
* @method Phaser.Curves.Spline#addPoint
9595
* @since 3.0.0
9696
*
97-
* @param {number} x - [description]
98-
* @param {number} y - [description]
97+
* @param {number} x - The x coordinate of this curve
98+
* @param {number} y - The y coordinate of this curve
9999
*
100-
* @return {Phaser.Math.Vector2} [description]
100+
* @return {Phaser.Math.Vector2} The new Vector2 added to the curve
101101
*/
102102
addPoint: function (x, y)
103103
{
@@ -176,7 +176,7 @@ var SplineCurve = new Class({
176176
},
177177

178178
/**
179-
* [description]
179+
* Exports a JSON object containing this curve data.
180180
*
181181
* @method Phaser.Curves.Spline#toJSON
182182
* @since 3.0.0
@@ -202,14 +202,14 @@ var SplineCurve = new Class({
202202
});
203203

204204
/**
205-
* [description]
205+
* Imports a JSON object containing this curve data.
206206
*
207207
* @function Phaser.Curves.Spline.fromJSON
208208
* @since 3.0.0
209209
*
210210
* @param {Phaser.Types.Curves.JSONCurve} data - The JSON object containing this curve data.
211211
*
212-
* @return {Phaser.Curves.Spline} [description]
212+
* @return {Phaser.Curves.Spline} The spline curve created.
213213
*/
214214
SplineCurve.fromJSON = function (data)
215215
{

0 commit comments

Comments
 (0)