Skip to content

Commit cc09986

Browse files
committed
Updated jsdocs
1 parent 3d4be64 commit cc09986

18 files changed

Lines changed: 174 additions & 119 deletions

File tree

src/animations/Animation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ var Animation = new Class({
435435
* @method Phaser.Animations.Animation#getFrames
436436
* @since 3.0.0
437437
*
438-
* @param {[type]} textureManager - [description]
438+
* @param {Phaser.Textures.TextureManager} textureManager - [description]
439439
* @param {[type]} frames - [description]
440440
*
441441
* @return {Phaser.Animations.AnimationFrame[]} [description]

src/boot/Game.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ var Game = new Class({
346346
* @since 3.0.0
347347
*
348348
* @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.
349-
* @param {number} delta - The delta time elapsed since the last frame.
349+
* @param {number} delta - The delta time, in ms, elapsed since the last frame.
350350
*/
351351
step: function (time, delta)
352352
{

src/cameras/2d/Camera.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1283,10 +1283,10 @@ var Camera = new Class({
12831283
* @method Phaser.Cameras.Scene2D.Camera#update
12841284
* @since 3.0.0
12851285
*
1286-
* @param {[type]} timestep - [description]
1287-
* @param {[type]} delta - [description]
1286+
* @param {integer} time - The current timestamp as generated by the Request Animation Frame or SetTimeout.
1287+
* @param {number} delta - The delta time, in ms, elapsed since the last frame.
12881288
*/
1289-
update: function (timestep, delta)
1289+
update: function (time, delta)
12901290
{
12911291
if (this._flashAlpha > 0.0)
12921292
{

src/cameras/2d/CameraManager.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ var CameraManager = new Class({
325325
* @method Phaser.Cameras.Scene2D.CameraManager#getCameraBelowPointer
326326
* @since 3.0.0
327327
*
328-
* @param {[type]} pointer - [description]
328+
* @param {Phaser.Input.Pointer} pointer - [description]
329329
*
330330
* @return {Phaser.Cameras.Scene2D.Camera} [description]
331331
*/
@@ -375,9 +375,9 @@ var CameraManager = new Class({
375375
* @method Phaser.Cameras.Scene2D.CameraManager#render
376376
* @since 3.0.0
377377
*
378-
* @param {[type]} renderer - [description]
379-
* @param {[type]} children - [description]
380-
* @param {[type]} interpolation - [description]
378+
* @param {Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer} renderer - The Renderer that will render the children to this camera.
379+
* @param {Phaser.GameObjects.GameObject[]} children - An array of renderable Game Objects.
380+
* @param {number} interpolation - Interpolation value. Reserved for future use.
381381
*/
382382
render: function (renderer, children, interpolation)
383383
{

src/cameras/controls/SmoothedKeyControl.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ var SmoothedKeyControl = new Class({
304304
* @method Phaser.Cameras.Controls.SmoothedKeyControl#update
305305
* @since 3.0.0
306306
*
307-
* @param {[type]} delta - [description]
307+
* @param {number} delta - The delta time, in ms, elapsed since the last frame.
308308
*/
309309
update: function (delta)
310310
{

src/curves/CubicBezierCurve.js

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ var CubicBezierCurve = new Class({
8282
},
8383

8484
/**
85-
* [description]
85+
* Gets the starting point on the curve.
8686
*
8787
* @method Phaser.Curves.CubicBezierCurve#getStartPoint
8888
* @since 3.0.0
8989
*
90-
* @param {Phaser.Math.Vector2} out - [description]
90+
* @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.
9191
*
92-
* @return {Phaser.Math.Vector2} [description]
92+
* @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.
9393
*/
9494
getStartPoint: function (out)
9595
{
@@ -104,25 +104,25 @@ var CubicBezierCurve = new Class({
104104
* @method Phaser.Curves.CubicBezierCurve#getResolution
105105
* @since 3.0.0
106106
*
107-
* @param {[type]} divisions - [description]
107+
* @param {number} divisions - The amount of divisions used by this curve.
108108
*
109-
* @return {[type]} [description]
109+
* @return {number} The resolution of the curve.
110110
*/
111111
getResolution: function (divisions)
112112
{
113113
return divisions;
114114
},
115115

116116
/**
117-
* [description]
117+
* Get point at relative position in curve according to length.
118118
*
119119
* @method Phaser.Curves.CubicBezierCurve#getPoint
120120
* @since 3.0.0
121121
*
122-
* @param {[type]} t - [description]
123-
* @param {[type]} out - [description]
122+
* @param {float} t - The position along the curve to return. Where 0 is the start and 1 is the end.
123+
* @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.
124124
*
125-
* @return {[type]} [description]
125+
* @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.
126126
*/
127127
getPoint: function (t, out)
128128
{
@@ -190,6 +190,16 @@ var CubicBezierCurve = new Class({
190190

191191
});
192192

193+
/**
194+
* [description]
195+
*
196+
* @function Phaser.Curves.CubicBezierCurve.fromJSON
197+
* @since 3.0.0
198+
*
199+
* @param {object} data - The JSON object containing this curve data.
200+
*
201+
* @return {Phaser.Curves.CubicBezierCurve} [description]
202+
*/
193203
CubicBezierCurve.fromJSON = function (data)
194204
{
195205
var points = data.points;

src/curves/Curve.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,10 +139,10 @@ var Curve = new Class({
139139
* @method Phaser.Curves.Curve#getBounds
140140
* @since 3.0.0
141141
*
142-
* @param {Phaser.Geom.Rectangle} out - The Rectangle to store the bounds in. If falsey a new object will be created.
142+
* @param {Phaser.Geom.Rectangle} [out] - The Rectangle to store the bounds in. If falsey a new object will be created.
143143
* @param {integer} [accuracy=16] - The accuracy of the bounds calculations.
144144
*
145-
* @return {Phaser.Geom.Rectangle} A Rectangle containing the bounds values of this Curve.
145+
* @return {Phaser.Geom.Rectangle} A Rectangle object holding the bounds of this curve. If `out` was given it will be this object.
146146
*/
147147
getBounds: function (out, accuracy)
148148
{

src/curves/EllipseCurve.js

Lines changed: 43 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -139,14 +139,14 @@ var EllipseCurve = new Class({
139139
},
140140

141141
/**
142-
* [description]
142+
* Gets the starting point on the curve.
143143
*
144144
* @method Phaser.Curves.EllipseCurve#getStartPoint
145145
* @since 3.0.0
146146
*
147-
* @param {[type]} out - [description]
147+
* @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.
148148
*
149-
* @return {[type]} [description]
149+
* @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.
150150
*/
151151
getStartPoint: function (out)
152152
{
@@ -161,25 +161,25 @@ var EllipseCurve = new Class({
161161
* @method Phaser.Curves.EllipseCurve#getResolution
162162
* @since 3.0.0
163163
*
164-
* @param {[type]} divisions - [description]
164+
* @param {number} divisions - [description]
165165
*
166-
* @return {[type]} [description]
166+
* @return {number} [description]
167167
*/
168168
getResolution: function (divisions)
169169
{
170170
return divisions * 2;
171171
},
172172

173173
/**
174-
* [description]
174+
* Get point at relative position in curve according to length.
175175
*
176176
* @method Phaser.Curves.EllipseCurve#getPoint
177177
* @since 3.0.0
178178
*
179-
* @param {[type]} t - [description]
180-
* @param {[type]} out - [description]
179+
* @param {float} t - The position along the curve to return. Where 0 is the start and 1 is the end.
180+
* @param {Phaser.Math.Vector2} [out] - A Vector2 object to store the result in. If not given will be created.
181181
*
182-
* @return {[type]} [description]
182+
* @return {Phaser.Math.Vector2} The coordinates of the point on the curve. If an `out` object was given this will be returned.
183183
*/
184184
getPoint: function (t, out)
185185
{
@@ -245,14 +245,14 @@ var EllipseCurve = new Class({
245245
},
246246

247247
/**
248-
* [description]
248+
* Sets the horizontal radius of this curve.
249249
*
250250
* @method Phaser.Curves.EllipseCurve#setXRadius
251251
* @since 3.0.0
252252
*
253-
* @param {[type]} value - [description]
253+
* @param {number} value - The horizontal radius of this curve.
254254
*
255-
* @return {[type]} [description]
255+
* @return {Phaser.Curves.EllipseCurve} This curve object.
256256
*/
257257
setXRadius: function (value)
258258
{
@@ -262,14 +262,14 @@ var EllipseCurve = new Class({
262262
},
263263

264264
/**
265-
* [description]
265+
* Sets the vertical radius of this curve.
266266
*
267267
* @method Phaser.Curves.EllipseCurve#setYRadius
268268
* @since 3.0.0
269269
*
270-
* @param {[type]} value - [description]
270+
* @param {number} value - The vertical radius of this curve.
271271
*
272-
* @return {[type]} [description]
272+
* @return {Phaser.Curves.EllipseCurve} This curve object.
273273
*/
274274
setYRadius: function (value)
275275
{
@@ -279,14 +279,14 @@ var EllipseCurve = new Class({
279279
},
280280

281281
/**
282-
* [description]
282+
* Sets the width of this curve.
283283
*
284284
* @method Phaser.Curves.EllipseCurve#setWidth
285285
* @since 3.0.0
286286
*
287-
* @param {[type]} value - [description]
287+
* @param {number} value - The width of this curve.
288288
*
289-
* @return {[type]} [description]
289+
* @return {Phaser.Curves.EllipseCurve} This curve object.
290290
*/
291291
setWidth: function (value)
292292
{
@@ -296,14 +296,14 @@ var EllipseCurve = new Class({
296296
},
297297

298298
/**
299-
* [description]
299+
* Sets the height of this curve.
300300
*
301301
* @method Phaser.Curves.EllipseCurve#setHeight
302302
* @since 3.0.0
303303
*
304-
* @param {[type]} value - [description]
304+
* @param {number} value - The height of this curve.
305305
*
306-
* @return {[type]} [description]
306+
* @return {Phaser.Curves.EllipseCurve} This curve object.
307307
*/
308308
setHeight: function (value)
309309
{
@@ -313,14 +313,14 @@ var EllipseCurve = new Class({
313313
},
314314

315315
/**
316-
* [description]
316+
* Sets the start angle of this curve.
317317
*
318318
* @method Phaser.Curves.EllipseCurve#setStartAngle
319319
* @since 3.0.0
320320
*
321-
* @param {[type]} value - [description]
321+
* @param {number} value - The start angle of this curve, in radians.
322322
*
323-
* @return {[type]} [description]
323+
* @return {Phaser.Curves.EllipseCurve} This curve object.
324324
*/
325325
setStartAngle: function (value)
326326
{
@@ -330,14 +330,14 @@ var EllipseCurve = new Class({
330330
},
331331

332332
/**
333-
* [description]
333+
* Sets the end angle of this curve.
334334
*
335335
* @method Phaser.Curves.EllipseCurve#setEndAngle
336336
* @since 3.0.0
337337
*
338-
* @param {[type]} value - [description]
338+
* @param {number} value - The end angle of this curve, in radians.
339339
*
340-
* @return {[type]} [description]
340+
* @return {Phaser.Curves.EllipseCurve} This curve object.
341341
*/
342342
setEndAngle: function (value)
343343
{
@@ -347,14 +347,14 @@ var EllipseCurve = new Class({
347347
},
348348

349349
/**
350-
* [description]
350+
* Sets if this curve extends clockwise or anti-clockwise.
351351
*
352352
* @method Phaser.Curves.EllipseCurve#setClockwise
353353
* @since 3.0.0
354354
*
355-
* @param {[type]} value - [description]
355+
* @param {boolean} value - The clockwise state of this curve.
356356
*
357-
* @return {[type]} [description]
357+
* @return {Phaser.Curves.EllipseCurve} This curve object.
358358
*/
359359
setClockwise: function (value)
360360
{
@@ -364,14 +364,14 @@ var EllipseCurve = new Class({
364364
},
365365

366366
/**
367-
* [description]
367+
* Sets the rotation of this curve.
368368
*
369369
* @method Phaser.Curves.EllipseCurve#setRotation
370370
* @since 3.0.0
371371
*
372-
* @param {[type]} value - [description]
372+
* @param {number} value - The rotation of this curve, in radians.
373373
*
374-
* @return {[type]} [description]
374+
* @return {Phaser.Curves.EllipseCurve} This curve object.
375375
*/
376376
setRotation: function (value)
377377
{
@@ -573,6 +573,16 @@ var EllipseCurve = new Class({
573573

574574
});
575575

576+
/**
577+
* [description]
578+
*
579+
* @function Phaser.Curves.EllipseCurve.fromJSON
580+
* @since 3.0.0
581+
*
582+
* @param {object} data - The JSON object containing this curve data.
583+
*
584+
* @return {Phaser.Curves.EllipseCurve} [description]
585+
*/
576586
EllipseCurve.fromJSON = function (data)
577587
{
578588
return new EllipseCurve(data);

0 commit comments

Comments
 (0)