Skip to content

Commit 18585de

Browse files
committed
Lots of jsdoc fixes
1 parent a469110 commit 18585de

33 files changed

Lines changed: 184 additions & 106 deletions

File tree

src/animations/AnimationManager.js

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -229,21 +229,26 @@ var AnimationManager = new Class({
229229
return output;
230230
},
231231

232+
/**
233+
* @typedef {object} GenerateFrameNamesConfig
234+
*
235+
* @property {string} [prefix=''] - [description]
236+
* @property {integer} [start=0] - [description]
237+
* @property {integer} [end=0] - [description]
238+
* @property {string} [suffix=''] - [description]
239+
* @property {integer} [zeroPad=0] - [description]
240+
* @property {AnimationFrameConfig[]} [outputArray=[]] - [description]
241+
* @property {boolean} [frames=false] - [description]
242+
*/
243+
232244
/**
233245
* [description]
234246
*
235247
* @method Phaser.Animations.AnimationManager#generateFrameNames
236248
* @since 3.0.0
237249
*
238250
* @param {string} key - [description]
239-
* @param {object} config - [description]
240-
* @param {string} [config.prefix=''] - [description]
241-
* @param {integer} [config.start=0] - [description]
242-
* @param {integer} [config.end=0] - [description]
243-
* @param {string} [config.suffix=''] - [description]
244-
* @param {integer} [config.zeroPad=0] - [description]
245-
* @param {AnimationFrameConfig[]} [config.outputArray=[]] - [description]
246-
* @param {boolean} [config.frames=false] - [description]
251+
* @param {GenerateFrameNamesConfig} config - [description]
247252
*
248253
* @return {AnimationFrameConfig[]} [description]
249254
*/
@@ -301,19 +306,24 @@ var AnimationManager = new Class({
301306
return out;
302307
},
303308

309+
/**
310+
* @typedef {object} GenerateFrameNumbersConfig
311+
*
312+
* @property {integer} [start=0] - [description]
313+
* @property {integer} [end=-1] - [description]
314+
* @property {boolean} [first=false] - [description]
315+
* @property {AnimationFrameConfig[]} [outputArray=[]] - [description]
316+
* @property {boolean} [frames=false] - [description]
317+
*/
318+
304319
/**
305320
* [description]
306321
*
307322
* @method Phaser.Animations.AnimationManager#generateFrameNumbers
308323
* @since 3.0.0
309324
*
310325
* @param {string} key - [description]
311-
* @param {object} config - [description]
312-
* @param {integer} [config.start=0] - [description]
313-
* @param {integer} [config.end=-1] - [description]
314-
* @param {boolean} [config.first=false] - [description]
315-
* @param {AnimationFrameConfig[]} [config.outputArray=[]] - [description]
316-
* @param {boolean} [config.frames=false] - [description]
326+
* @param {GenerateFrameNumbersConfig} config - [description]
317327
*
318328
* @return {AnimationFrameConfig[]} [description]
319329
*/

src/boot/PluginManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ var PluginManager = new Class({
161161
* Plugin is the object to instantiate to create the plugin
162162
* Mapping is what the plugin is injected into the Scene.Systems as (i.e. input)
163163
*
164-
* @method PluginManager.register
164+
* @method Phaser.Boot.PluginManager.register
165165
* @since 3.0.0
166166
*
167167
* @param {string} key - [description]

src/boot/TimeStep.js

Lines changed: 52 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ var TimeStep = new Class({
4949
/**
5050
* A reference to the Phaser.Game instance.
5151
*
52-
* @property {Phaser.Game} game
52+
* @name Phaser.Boot.TimeStep#game
53+
* @type {Phaser.Game}
5354
* @readOnly
5455
* @since 3.0.0
5556
*/
@@ -58,7 +59,8 @@ var TimeStep = new Class({
5859
/**
5960
* [description]
6061
*
61-
* @property {Phaser.DOM.RequestAnimationFrame} raf
62+
* @name Phaser.Boot.TimeStep#raf
63+
* @type {Phaser.DOM.RequestAnimationFrame}
6264
* @readOnly
6365
* @since 3.0.0
6466
*/
@@ -67,7 +69,8 @@ var TimeStep = new Class({
6769
/**
6870
* A flag that is set once the TimeStep has started running and toggled when it stops.
6971
*
70-
* @property {boolean} started
72+
* @name Phaser.Boot.TimeStep#started
73+
* @type {boolean}
7174
* @readOnly
7275
* @default false
7376
* @since 3.0.0
@@ -80,7 +83,8 @@ var TimeStep = new Class({
8083
* the TimeStep is sent to sleep, where-as `started` remains `true`, only changing if
8184
* the TimeStep is actually stopped, not just paused.
8285
*
83-
* @property {boolean} running
86+
* @name Phaser.Boot.TimeStep#running
87+
* @name {boolean}
8488
* @readOnly
8589
* @default false
8690
* @since 3.0.0
@@ -90,7 +94,8 @@ var TimeStep = new Class({
9094
/**
9195
* The minimum fps rate you want the Time Step to run at.
9296
*
93-
* @property {integer} minFps
97+
* @name Phaser.Boot.TimeStep#minFps
98+
* @type {integer}
9499
* @default 5
95100
* @since 3.0.0
96101
*/
@@ -103,7 +108,8 @@ var TimeStep = new Class({
103108
* the control of Phaser. Instead, it allows you to determine performance issues and if the Time Step
104109
* is spiraling out of control.
105110
*
106-
* @property {integer} targetFps
111+
* @name Phaser.Boot.TimeStep#targetFps
112+
* @name {integer}
107113
* @default 60
108114
* @since 3.0.0
109115
*/
@@ -113,7 +119,8 @@ var TimeStep = new Class({
113119
* The minFps value in ms.
114120
* Defaults to 200ms between frames (i.e. super slow!)
115121
*
116-
* @property {number} _min
122+
* @name Phaser.Boot.TimeStep#_min
123+
* @type {number}
117124
* @private
118125
* @since 3.0.0
119126
*/
@@ -123,7 +130,8 @@ var TimeStep = new Class({
123130
* The targetFps value in ms.
124131
* Defaults to 16.66ms between frames (i.e. normal)
125132
*
126-
* @property {number} _target
133+
* @name Phaser.Boot.TimeStep#_target
134+
* @type {number}
127135
* @private
128136
* @since 3.0.0
129137
*/
@@ -132,7 +140,8 @@ var TimeStep = new Class({
132140
/**
133141
* An exponential moving average of the frames per second.
134142
*
135-
* @property {integer} actualFps
143+
* @name Phaser.Boot.TimeStep#actualFps
144+
* @type {integer}
136145
* @readOnly
137146
* @default 60
138147
* @since 3.0.0
@@ -142,7 +151,8 @@ var TimeStep = new Class({
142151
/**
143152
* [description]
144153
*
145-
* @property {integer} nextFpsUpdate
154+
* @name Phaser.Boot.TimeStep#nextFpsUpdate
155+
* @type {integer}
146156
* @readOnly
147157
* @default 0
148158
* @since 3.0.0
@@ -152,7 +162,8 @@ var TimeStep = new Class({
152162
/**
153163
* The number of frames processed this second.
154164
*
155-
* @property {integer} framesThisSecond
165+
* @name Phaser.Boot.TimeStep#framesThisSecond
166+
* @type {integer}
156167
* @readOnly
157168
* @default 0
158169
* @since 3.0.0
@@ -162,7 +173,8 @@ var TimeStep = new Class({
162173
/**
163174
* A callback to be invoked each time the Time Step steps.
164175
*
165-
* @property {TimeStepCallback} callback
176+
* @name Phaser.Boot.TimeStep#callback
177+
* @type {TimeStepCallback}
166178
* @default NOOP
167179
* @since 3.0.0
168180
*/
@@ -172,7 +184,8 @@ var TimeStep = new Class({
172184
* You can force the Time Step to use Set Timeout instead of Request Animation Frame by setting
173185
* the `forceSetTimeOut` property to `true` in the Game Configuration object. It cannot be changed at run-time.
174186
*
175-
* @property {boolean} forceSetTimeOut
187+
* @name Phaser.Boot.TimeStep#forceSetTimeOut
188+
* @type {boolean}
176189
* @readOnly
177190
* @default false
178191
* @since 3.0.0
@@ -182,7 +195,8 @@ var TimeStep = new Class({
182195
/**
183196
* [description]
184197
*
185-
* @property {integer} time
198+
* @name Phaser.Boot.TimeStep#time
199+
* @type {integer}
186200
* @default 0
187201
* @since 3.0.0
188202
*/
@@ -191,7 +205,8 @@ var TimeStep = new Class({
191205
/**
192206
* [description]
193207
*
194-
* @property {integer} startTime
208+
* @name Phaser.Boot.TimeStep#startTime
209+
* @type {integer}
195210
* @default 0
196211
* @since 3.0.0
197212
*/
@@ -200,7 +215,8 @@ var TimeStep = new Class({
200215
/**
201216
* [description]
202217
*
203-
* @property {integer} lastTime
218+
* @name Phaser.Boot.TimeStep#lastTime
219+
* @type {integer}
204220
* @default 0
205221
* @since 3.0.0
206222
*/
@@ -209,7 +225,8 @@ var TimeStep = new Class({
209225
/**
210226
* [description]
211227
*
212-
* @property {integer} frame
228+
* @name Phaser.Boot.TimeStep#frame
229+
* @type {integer}
213230
* @readOnly
214231
* @default 0
215232
* @since 3.0.0
@@ -219,7 +236,8 @@ var TimeStep = new Class({
219236
/**
220237
* [description]
221238
*
222-
* @property {boolean} inFocus
239+
* @name Phaser.Boot.TimeStep#inFocus
240+
* @type {boolean}
223241
* @readOnly
224242
* @default true
225243
* @since 3.0.0
@@ -229,7 +247,8 @@ var TimeStep = new Class({
229247
/**
230248
* [description]
231249
*
232-
* @property {integer} _pauseTime
250+
* @name Phaser.Boot.TimeStep#_pauseTime
251+
* @type {integer}
233252
* @private
234253
* @default 0
235254
* @since 3.0.0
@@ -239,7 +258,8 @@ var TimeStep = new Class({
239258
/**
240259
* [description]
241260
*
242-
* @property {integer} _coolDown
261+
* @name Phaser.Boot.TimeStep#_coolDown
262+
* @type {integer}
243263
* @private
244264
* @default 0
245265
* @since 3.0.0
@@ -249,7 +269,8 @@ var TimeStep = new Class({
249269
/**
250270
* [description]
251271
*
252-
* @property {integer} delta
272+
* @name Phaser.Boot.TimeStep#delta
273+
* @type {integer}
253274
* @default 0
254275
* @since 3.0.0
255276
*/
@@ -258,7 +279,8 @@ var TimeStep = new Class({
258279
/**
259280
* [description]
260281
*
261-
* @property {integer} deltaIndex
282+
* @name Phaser.Boot.TimeStep#deltaIndex
283+
* @type {integer}
262284
* @default 0
263285
* @since 3.0.0
264286
*/
@@ -267,7 +289,8 @@ var TimeStep = new Class({
267289
/**
268290
* [description]
269291
*
270-
* @property {array} deltaHistory
292+
* @name Phaser.Boot.TimeStep#deltaHistory
293+
* @type {array}
271294
* @default 0
272295
* @since 3.0.0
273296
*/
@@ -276,7 +299,8 @@ var TimeStep = new Class({
276299
/**
277300
* [description]
278301
*
279-
* @property {integer} deltaSmoothingMax
302+
* @name Phaser.Boot.TimeStep#deltaSmoothingMax
303+
* @type {integer}
280304
* @default 10
281305
* @since 3.0.0
282306
*/
@@ -285,7 +309,8 @@ var TimeStep = new Class({
285309
/**
286310
* [description]
287311
*
288-
* @property {integer} panicMax
312+
* @name Phaser.Boot.TimeStep#panicMax
313+
* @type {integer}
289314
* @default 120
290315
* @since 3.0.0
291316
*/
@@ -296,7 +321,8 @@ var TimeStep = new Class({
296321
* Unlike with `delta` no smoothing, capping, or averaging is applied to this value.
297322
* So please be careful when using this value in calculations.
298323
*
299-
* @property {number} rawDelta
324+
* @name Phaser.Boot.TimeStep#rawDelta
325+
* @type {number}
300326
* @default 0
301327
* @since 3.0.0
302328
*/

src/curves/EllipseCurve.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ var EllipseCurve = new Class({
9696
/**
9797
* [description]
9898
*
99-
* @name {Phaser.Curves.EllipseCurve#p0
99+
* @name Phaser.Curves.EllipseCurve#p0
100100
* @type {Phaser.Math.Vector2}
101101
* @since 3.0.0
102102
*/

src/curves/path/Path.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ var Path = new Class({
9191
/**
9292
* [description]
9393
*
94-
* @name {Phaser.Curves.Path#startPoint
94+
* @name Phaser.Curves.Path#startPoint
9595
* @type {Phaser.Math.Vector2}
9696
* @since 3.0.0
9797
*/
@@ -100,7 +100,7 @@ var Path = new Class({
100100
/**
101101
* [description]
102102
*
103-
* @name {Phaser.Curves.Path#_tmpVec2A
103+
* @name Phaser.Curves.Path#_tmpVec2A
104104
* @type {Phaser.Math.Vector2}
105105
* @private
106106
* @since 3.0.0
@@ -110,7 +110,7 @@ var Path = new Class({
110110
/**
111111
* [description]
112112
*
113-
* @name {Phaser.Curves.Path#_tmpVec2B
113+
* @name Phaser.Curves.Path#_tmpVec2B
114114
* @type {Phaser.Math.Vector2}
115115
* @private
116116
* @since 3.0.0

0 commit comments

Comments
 (0)