Skip to content

Commit 87d6cda

Browse files
committed
Update JSDoc on GameObjects
1 parent 0b1078f commit 87d6cda

3 files changed

Lines changed: 27 additions & 27 deletions

File tree

src/gameobjects/particles/ParticleEmitter.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ var ParticleEmitter = new Class({
149149

150150
/**
151151
* The name of this Game Object.
152-
*
152+
*
153153
* Empty by default and never populated by Phaser, this is left for developers to use.
154154
*
155155
* @name Phaser.GameObjects.Particles.ParticleEmitter#name
@@ -614,7 +614,7 @@ var ParticleEmitter = new Class({
614614
* [description]
615615
*
616616
* @name Phaser.GameObjects.Particles.ParticleEmitter#follow
617-
* @type {?[type]}
617+
* @type {?Phaser.GameObjects.Particles.Particle}
618618
* @default null
619619
* @since 3.0.0
620620
*/
@@ -673,7 +673,7 @@ var ParticleEmitter = new Class({
673673
* [description]
674674
*
675675
* @name Phaser.GameObjects.Particles.ParticleEmitter#dead
676-
* @type {array}
676+
* @type {Phaser.GameObjects.Particles.Particle[]}
677677
* @private
678678
* @since 3.0.0
679679
*/
@@ -683,7 +683,7 @@ var ParticleEmitter = new Class({
683683
* [description]
684684
*
685685
* @name Phaser.GameObjects.Particles.ParticleEmitter#alive
686-
* @type {array}
686+
* @type {Phaser.GameObjects.Particles.Particle[]}
687687
* @private
688688
* @since 3.0.0
689689
*/
@@ -877,10 +877,10 @@ var ParticleEmitter = new Class({
877877
* @method Phaser.GameObjects.Particles.ParticleEmitter#startFollow
878878
* @since 3.0.0
879879
*
880-
* @param {[type]} target - [description]
881-
* @param {number} offsetX - [description]
882-
* @param {number} offsetY - [description]
883-
* @param {boolean} trackVisible - [description]
880+
* @param {Phaser.GameObjects.Particles.Particle} target - [description]
881+
* @param {number} [offsetX=0] - [description]
882+
* @param {number} [offsetY=0] - [description]
883+
* @param {boolean} [trackVisible=false] - [description]
884884
*
885885
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
886886
*/
@@ -985,7 +985,7 @@ var ParticleEmitter = new Class({
985985
else if (t === 'object')
986986
{
987987
var frameConfig = frames;
988-
988+
989989
frames = GetFastValue(frameConfig, 'frames', null);
990990

991991
if (frames)
@@ -1372,7 +1372,7 @@ var ParticleEmitter = new Class({
13721372
* @method Phaser.GameObjects.Particles.ParticleEmitter#setEmitZone
13731373
* @since 3.0.0
13741374
*
1375-
* @param {[type]} zoneConfig - [description]
1375+
* @param {object} [zoneConfig] - [description]
13761376
*
13771377
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
13781378
*/
@@ -1424,7 +1424,7 @@ var ParticleEmitter = new Class({
14241424
* @method Phaser.GameObjects.Particles.ParticleEmitter#setDeathZone
14251425
* @since 3.0.0
14261426
*
1427-
* @param {[type]} zoneConfig - [description]
1427+
* @param {object} [zoneConfig] - [description]
14281428
*
14291429
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
14301430
*/
@@ -1534,8 +1534,8 @@ var ParticleEmitter = new Class({
15341534
* @method Phaser.GameObjects.Particles.ParticleEmitter#onParticleEmit
15351535
* @since 3.0.0
15361536
*
1537-
* @param {[type]} callback - [description]
1538-
* @param {[type]} context - [description]
1537+
* @param {function} callback - [description]
1538+
* @param {any} [context] - [description]
15391539
*
15401540
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
15411541
*/
@@ -1566,8 +1566,8 @@ var ParticleEmitter = new Class({
15661566
* @method Phaser.GameObjects.Particles.ParticleEmitter#onParticleDeath
15671567
* @since 3.0.0
15681568
*
1569-
* @param {[type]} callback - [description]
1570-
* @param {[type]} context - [description]
1569+
* @param {function} callback - [description]
1570+
* @param {any} [context] - [description]
15711571
*
15721572
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
15731573
*/
@@ -1619,8 +1619,8 @@ var ParticleEmitter = new Class({
16191619
* @method Phaser.GameObjects.Particles.ParticleEmitter#forEachAlive
16201620
* @since 3.0.0
16211621
*
1622-
* @param {[type]} callback - [description]
1623-
* @param {[type]} thisArg - [description]
1622+
* @param {function} callback - [description]
1623+
* @param {any} thisArg - [description]
16241624
*
16251625
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
16261626
*/
@@ -1644,8 +1644,8 @@ var ParticleEmitter = new Class({
16441644
* @method Phaser.GameObjects.Particles.ParticleEmitter#forEachDead
16451645
* @since 3.0.0
16461646
*
1647-
* @param {[type]} callback - [description]
1648-
* @param {[type]} thisArg - [description]
1647+
* @param {function} callback - [description]
1648+
* @param {any} thisArg - [description]
16491649
*
16501650
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
16511651
*/
@@ -1914,7 +1914,7 @@ var ParticleEmitter = new Class({
19141914

19151915
StableSort.inplace(particles, this.indexSortCallback);
19161916
}
1917-
1917+
19181918
if (!this.on)
19191919
{
19201920
return;

src/gameobjects/particles/ParticleEmitterManager.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var Render = require('./ParticleManagerRender');
2929
* @param {Phaser.Scene} scene - [description]
3030
* @param {string} texture - [description]
3131
* @param {string|integer} frame - [description]
32-
* @param {[type]} emitters - [description]
32+
* @param {Phaser.GameObjects.Particles.ParticleEmitter[]} emitters - [description]
3333
*/
3434
var ParticleEmitterManager = new Class({
3535

@@ -94,7 +94,7 @@ var ParticleEmitterManager = new Class({
9494
* [description]
9595
*
9696
* @name Phaser.GameObjects.Particles.ParticleEmitterManager#frameNames
97-
* @type {array}
97+
* @type {Phaser.Textures.Frame[]}
9898
* @since 3.0.0
9999
*/
100100
this.frameNames = [];
@@ -194,8 +194,8 @@ var ParticleEmitterManager = new Class({
194194
* @method Phaser.GameObjects.Particles.ParticleEmitterManager#setEmitterFrames
195195
* @since 3.0.0
196196
*
197-
* @param {[type]} frames - [description]
198-
* @param {[type]} emitter - [description]
197+
* @param {Phaser.Textures.Frame|Phaser.Textures.Frame[]} frames - [description]
198+
* @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - [description]
199199
*
200200
* @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Game Object.
201201
*/
@@ -378,7 +378,7 @@ var ParticleEmitterManager = new Class({
378378
* @method Phaser.GameObjects.Particles.ParticleEmitterManager#getProcessors
379379
* @since 3.0.0
380380
*
381-
* @return {[type]} [description]
381+
* @return {Phaser.GameObjects.Particles.GravityWell[]} [description]
382382
*/
383383
getProcessors: function ()
384384
{

src/gameobjects/text/static/Text.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ var Text = new Class({
150150
* Allows you to add extra spacing if the browser is unable to accurately determine the true font dimensions.
151151
*
152152
* @name Phaser.GameObjects.Text#padding
153-
* @type {object}
153+
* @type {{left:number,right:number,top:number,bottom:number}}
154154
* @since 3.0.0
155155
*/
156156
this.padding = { left: 0, right: 0, top: 0, bottom: 0 };
@@ -201,7 +201,7 @@ var Text = new Class({
201201
{
202202
this.setPadding(style.padding);
203203
}
204-
204+
205205
if (style && style.lineSpacing)
206206
{
207207
this._lineSpacing = style.lineSpacing;

0 commit comments

Comments
 (0)