Skip to content

Commit 32ce8d7

Browse files
committed
jsdoc fixes and removed un-used ResetKey file.
1 parent 504ba9e commit 32ce8d7

7 files changed

Lines changed: 105 additions & 116 deletions

File tree

src/boot/TimeStep.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ var TimeStep = new Class({
8484
* the TimeStep is actually stopped, not just paused.
8585
*
8686
* @name Phaser.Boot.TimeStep#running
87-
* @name {boolean}
87+
* @type {boolean}
8888
* @readOnly
8989
* @default false
9090
* @since 3.0.0
@@ -109,7 +109,7 @@ var TimeStep = new Class({
109109
* is spiraling out of control.
110110
*
111111
* @name Phaser.Boot.TimeStep#targetFps
112-
* @name {integer}
112+
* @type {integer}
113113
* @default 60
114114
* @since 3.0.0
115115
*/

src/curves/LineCurve.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ var LineCurve = new Class({
5656
/**
5757
* [description]
5858
*
59-
* @property Phaser.Curves.LineCurve#p1
59+
* @name Phaser.Curves.LineCurve#p1
6060
* @type {Phaser.Math.Vector2}
6161
* @since 3.0.0
6262
*/

src/gameobjects/bitmaptext/ParseRetroFont.js

Lines changed: 72 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -6,32 +6,28 @@
66

77
var GetValue = require('../../utils/object/GetValue');
88

9-
// * @param {number} characterWidth - The width of each character in the font set.
10-
// * @param {number} characterHeight - The height of each character in the font set.
11-
// * @param {string} chars - The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements.
12-
// * @param {number} [charsPerRow] - The number of characters per row in the font set. If not given charsPerRow will be the image width / characterWidth.
13-
// * @param {number} [xSpacing=0] - If the characters in the font set have horizontal spacing between them set the required amount here.
14-
// * @param {number} [ySpacing=0] - If the characters in the font set have vertical spacing between them set the required amount here.
15-
// * @param {number} [xOffset=0] - If the font set doesn't start at the top left of the given image, specify the X coordinate offset here.
16-
// * @param {number} [yOffset=0] - If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here.
17-
// Phaser.GameObject.RetroFont = function (game, key, characterWidth, characterHeight, chars, charsPerRow, xSpacing, ySpacing, xOffset, yOffset)
18-
19-
// {
20-
// image: key,
21-
// width: 32,
22-
// height: 32,
23-
// chars: 'string',
24-
// charsPerRow: null,
25-
// spacing: { x: 0, y: 0 },
26-
// offset: { x: 0, y: 0 }
27-
// }
9+
/**
10+
* @typedef {object} Phaser.GameObjects.BitmapText.ParseRetroFont.RetroFontConfig
11+
*
12+
* @property {string} image - [description]
13+
* @property {number} offset.x - If the font set doesn't start at the top left of the given image, specify the X coordinate offset here.
14+
* @property {number} offset.y - If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here.
15+
* @property {number} width - The width of each character in the font set.
16+
* @property {number} height - The height of each character in the font set.
17+
* @property {string} chars - The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements.
18+
* @property {number} charsPerRow - The number of characters per row in the font set. If not given charsPerRow will be the image width / characterWidth.
19+
* @property {number} spacing.x - If the characters in the font set have horizontal spacing between them set the required amount here.
20+
* @property {number} spacing.y - If the characters in the font set have vertical spacing between them set the required amount here.
21+
*/
2822

2923
/**
3024
* [description]
3125
*
32-
* @function ParseRetroFont
26+
* @function Phaser.GameObjects.BitmapText.ParseRetroFont
3327
* @since 3.0.0
34-
* @private
28+
*
29+
* @param {Phaser.Scene} scene - A reference to the Phaser Scene.
30+
* @param {Phaser.GameObjects.BitmapText.ParseRetroFont.RetroFontConfig} config - The font configuration object.
3531
*/
3632
var ParseRetroFont = function (scene, config)
3733
{
@@ -117,80 +113,91 @@ var ParseRetroFont = function (scene, config)
117113
};
118114

119115
/**
120-
* Text Set 1 = !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~
121-
* @constant
122-
* @type {string}
123-
*/
116+
* Text Set 1 = !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~
117+
*
118+
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET1
119+
* @type {string}
120+
*/
124121
ParseRetroFont.TEXT_SET1 = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~';
125122

126123
/**
127-
* Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ
128-
* @constant
129-
* @type {string}
130-
*/
124+
* Text Set 2 = !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ
125+
*
126+
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET2
127+
* @type {string}
128+
*/
131129
ParseRetroFont.TEXT_SET2 = ' !"#$%&\'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ';
132130

133131
/**
134-
* Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
135-
* @constant
136-
* @type {string}
137-
*/
132+
* Text Set 3 = ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
133+
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET3
134+
*
135+
* @type {string}
136+
*/
138137
ParseRetroFont.TEXT_SET3 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ';
139138

140139
/**
141-
* Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789
142-
* @constant
143-
* @type {string}
144-
*/
140+
* Text Set 4 = ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789
141+
*
142+
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET4
143+
* @type {string}
144+
*/
145145
ParseRetroFont.TEXT_SET4 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789';
146146

147147
/**
148-
* Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789
149-
* @constant
150-
* @type {string}
151-
*/
148+
* Text Set 5 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() '!?-*:0123456789
149+
*
150+
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET5
151+
* @type {string}
152+
*/
152153
ParseRetroFont.TEXT_SET5 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,/() \'!?-*:0123456789';
153154

154155
/**
155-
* Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.'
156-
* @constant
157-
* @type {string}
158-
*/
156+
* Text Set 6 = ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.'
157+
*
158+
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET6
159+
* @type {string}
160+
* /
159161
ParseRetroFont.TEXT_SET6 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ!?:;0123456789"(),-.\' ';
160162
161163
/**
162-
* Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39
163-
* @constant
164-
* @type {string}
165-
*/
164+
* Text Set 7 = AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-'39
165+
*
166+
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET7
167+
* @type {string}
168+
*/
166169
ParseRetroFont.TEXT_SET7 = 'AGMSY+:4BHNTZ!;5CIOU.?06DJPV,(17EKQW")28FLRX-\'39';
167170

168171
/**
169-
* Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ
170-
* @constant
171-
* @type {string}
172-
*/
172+
* Text Set 8 = 0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ
173+
*
174+
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET8
175+
* @type {string}
176+
*/
173177
ParseRetroFont.TEXT_SET8 = '0123456789 .ABCDEFGHIJKLMNOPQRSTUVWXYZ';
174178

175179
/**
176-
* Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!
177-
* @constant
178-
* @type {string}
179-
*/
180+
* Text Set 9 = ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,'"?!
181+
*
182+
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET9
183+
* @type {string}
184+
*/
180185
ParseRetroFont.TEXT_SET9 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ()-0123456789.:,\'"?!';
181186

182187
/**
183-
* Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ
184-
* @constant
185-
* @type {string}
186-
*/
188+
* Text Set 10 = ABCDEFGHIJKLMNOPQRSTUVWXYZ
189+
*
190+
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET10
191+
* @type {string}
192+
*/
187193
ParseRetroFont.TEXT_SET10 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
188194

189195
/**
190-
* Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789
191-
* @constant
192-
* @type {string}
193-
*/
196+
* Text Set 11 = ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()':;0123456789
197+
*
198+
* @name Phaser.GameObjects.BitmapText.ParseRetroFont.TEXT_SET11
199+
* @type {string}
200+
*/
194201
ParseRetroFont.TEXT_SET11 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ.,"-+!?()\':;0123456789';
195202

196203
module.exports = ParseRetroFont;

src/input/keyboard/keys/Key.js

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
*/
66

77
var Class = require('../../../utils/Class');
8+
var ResetKey = require('./ResetKey');
89

910
/**
1011
* @classdesc
@@ -185,6 +186,33 @@ var Key = new Class({
185186
* @since 3.0.0
186187
*/
187188
this._justUp = false;
189+
},
190+
191+
/**
192+
* Resets this Key object back to its default un-pressed state.
193+
*
194+
* @method Phaser.Input.Keyboard.Key.reset
195+
* @since 3.5.2
196+
*
197+
* @return {Phaser.Input.Keyboard.Key} This Key instance.
198+
*/
199+
reset: function ()
200+
{
201+
this.preventDefault = true;
202+
this.enabled = true;
203+
this.isDown = false;
204+
this.isUp = true;
205+
this.altKey = false;
206+
this.ctrlKey = false;
207+
this.shiftKey = false;
208+
this.timeDown = 0;
209+
this.duration = 0;
210+
this.timeUp = 0;
211+
this.repeats = 0;
212+
this._justDown = false;
213+
this._justUp = false;
214+
215+
return this;
188216
}
189217

190218
});

src/input/keyboard/keys/ResetKey.js

Lines changed: 0 additions & 46 deletions
This file was deleted.

src/loader/filetypes/AudioFile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var AudioFile = new Class({
3838
/**
3939
* [description]
4040
*
41-
* @property {AudioContext} context
41+
* @name {AudioContext} context
4242
* @since 3.0.0
4343
*/
4444
this.context = audioContext;

src/tilemaps/Tilemap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,7 @@ var Tilemap = new Class({
915915
* on at least one side.
916916
* @param {boolean} [filteringOptions.hasInterestingFace=false] - If true, only return tiles that
917917
* have at least one interesting face.
918-
* @param {LayerData} layer - [description]
918+
* @param {LayerData} [layer] - [description]
919919
*
920920
* @return {?Phaser.Tilemaps.Tilemap} Returns this, or null if the layer given was invalid.
921921
*/

0 commit comments

Comments
 (0)