Skip to content

Commit f1e646c

Browse files
committed
jsdoc fixes
1 parent 747f09a commit f1e646c

9 files changed

Lines changed: 92 additions & 22 deletions

File tree

src/physics/impact/TYPE.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* with other LITE or PASSIVE entities at all. The behavior for FIXED vs.
1414
* FIXED collisions is undefined.
1515
*
16-
* @name Phaser.Physics.Impact.TYPES
16+
* @name Phaser.Physics.Impact.TYPE
1717
* @type {object}
1818
* @since 3.0.0
1919
*/
@@ -22,7 +22,7 @@ module.exports = {
2222
/**
2323
* Collides with nothing.
2424
*
25-
* @name Phaser.Physics.Impact.TYPES.NONE
25+
* @name Phaser.Physics.Impact.TYPE.NONE
2626
* @type {integer}
2727
* @since 3.0.0
2828
*/
@@ -31,7 +31,7 @@ module.exports = {
3131
/**
3232
* Type A. Collides with Type B.
3333
*
34-
* @name Phaser.Physics.Impact.TYPES.A
34+
* @name Phaser.Physics.Impact.TYPE.A
3535
* @type {integer}
3636
* @since 3.0.0
3737
*/
@@ -40,7 +40,7 @@ module.exports = {
4040
/**
4141
* Type B. Collides with Type A.
4242
*
43-
* @name Phaser.Physics.Impact.TYPES.B
43+
* @name Phaser.Physics.Impact.TYPE.B
4444
* @type {integer}
4545
* @since 3.0.0
4646
*/
@@ -49,7 +49,7 @@ module.exports = {
4949
/**
5050
* Collides with both types A and B.
5151
*
52-
* @name Phaser.Physics.Impact.TYPES.BOTH
52+
* @name Phaser.Physics.Impact.TYPE.BOTH
5353
* @type {integer}
5454
* @since 3.0.0
5555
*/

src/physics/impact/World.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ var TYPE = require('./TYPE');
2323
* @property {number} [cellSize=64] - [description]
2424
* @property {number} [timeScale=1] - [description]
2525
* @property {float} [maxStep=0.05] - [description]
26-
* @property {number} [gravity=0] - [description]
2726
* @property {boolean} [debug=false] - [description]
2827
* @property {number} [maxVelocity=100] - [description]
2928
* @property {boolean} [debugShowBody=true] - [description]
@@ -38,7 +37,6 @@ var TYPE = require('./TYPE');
3837
* @property {(object|boolean)} [setBounds] - [description]
3938
* @property {number} [setBounds.x=0] - [description]
4039
* @property {number} [setBounds.y=0] - [description]
41-
* @property {number} [setBounds.x=0] - [description]
4240
* @property {number} [setBounds.width] - [description]
4341
* @property {number} [setBounds.height] - [description]
4442
* @property {number} [setBounds.thickness=64] - [description]
@@ -334,7 +332,7 @@ var World = new Class({
334332
* @method Phaser.Physics.Impact.World#setCollisionMapFromTilemapLayer
335333
* @since 3.0.0
336334
*
337-
* @param {(StaticTilemapLayer|DynamicTilemapLayer)} tilemapLayer - The tilemap layer to use.
335+
* @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer - The tilemap layer to use.
338336
* @param {object} [options] - Options for controlling the mapping from tiles to slope IDs.
339337
* @param {string} [options.slopeTileProperty=null] - Slope IDs can be stored on tiles directly
340338
* using Tiled's tileset editor. If a tile has a property with the given slopeTileProperty string

src/physics/matter-js/Factory.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ var Factory = new Class({
530530
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.
531531
* @param {object} [options={}] - [description]
532532
*
533-
* @return {Phaser.Physics.Matter.MatterImage} [description]
533+
* @return {Phaser.Physics.Matter.Image} [description]
534534
*/
535535
image: function (x, y, key, frame, options)
536536
{
@@ -547,10 +547,10 @@ var Factory = new Class({
547547
* @method Phaser.Physics.Matter.Factory#tileBody
548548
* @since 3.0.0
549549
*
550-
* @param {Phaser.GameObjects.Tile} tile - [description]
550+
* @param {Phaser.Tilemaps.Tile} tile - [description]
551551
* @param {object} options - [description]
552552
*
553-
* @return {Phaser.Physics.Matter.MatterTileBody} [description]
553+
* @return {Phaser.Physics.Matter.TileBody} [description]
554554
*/
555555
tileBody: function (tile, options)
556556
{
@@ -571,7 +571,7 @@ var Factory = new Class({
571571
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with. Set to `null` to skip this value.
572572
* @param {object} [options={}] - [description]
573573
*
574-
* @return {Phaser.Physics.Matter.MatterSprite} [description]
574+
* @return {Phaser.Physics.Matter.Sprite} [description]
575575
*/
576576
sprite: function (x, y, key, frame, options)
577577
{

src/physics/matter-js/MatterTileBody.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var Vertices = require('./lib/geometry/Vertices');
4040
* @extends Phaser.Physics.Matter.Components.Static
4141
*
4242
* @param {Phaser.Physics.Matter.World} world - [description]
43-
* @param {Phaser.GameObjects.Tile} tile - The target tile that should have a Matter body.
43+
* @param {Phaser.Tilemaps.Tile} tile - The target tile that should have a Matter body.
4444
* @param {object} [options] - Options to be used when creating the Matter body. See
4545
* Phaser.Physics.Matter.Matter.Body for a list of what Matter accepts.
4646
* @param {Phaser.Physics.Matter.Matter.Body} [options.body=null] - An existing Matter body to
@@ -71,7 +71,7 @@ var MatterTileBody = new Class({
7171
* The tile object the body is associated with.
7272
*
7373
* @name Phaser.Physics.Matter.TileBody#tile
74-
* @type {Phaser.GameObjects.Tile}
74+
* @type {Phaser.Tilemaps.Tile}
7575
* @since 3.0.0
7676
*/
7777
this.tile = tile;

src/physics/matter-js/World.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ var World = new Class({
530530
* @method Phaser.Physics.Matter.World#convertTilemapLayer
531531
* @since 3.0.0
532532
*
533-
* @param {(Phaser.GameObjects.StaticTilemapLayer|Phaser.GameObjects.DynamicTilemapLayer)} tilemapLayer -
533+
* @param {(Phaser.Tilemaps.DynamicTilemapLayer|Phaser.Tilemaps.StaticTilemapLayer)} tilemapLayer -
534534
* An array of tiles.
535535
* @param {object} [options] - Options to be passed to the MatterTileBody constructor. {@ee Phaser.Physics.Matter.TileBody}
536536
*
@@ -553,7 +553,7 @@ var World = new Class({
553553
* @method Phaser.Physics.Matter.World#convertTiles
554554
* @since 3.0.0
555555
*
556-
* @param {Phaser.GameObjects.Tile[]} tiles - An array of tiles.
556+
* @param {Phaser.Tilemaps.Tile[]} tiles - An array of tiles.
557557
* @param {object} [options] - Options to be passed to the MatterTileBody constructor. {@see Phaser.Physics.Matter.TileBody}
558558
*
559559
* @return {Phaser.Physics.Matter.World} This Matter World object.

src/physics/matter-js/index.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,60 @@ module.exports = {
2020
World: require('./World')
2121

2222
};
23+
24+
/**
25+
* @namespace Matter
26+
*/
27+
28+
/**
29+
* @classdesc
30+
* The `Matter.Body` module contains methods for creating and manipulating body models.
31+
* A `Matter.Body` is a rigid body that can be simulated by a `Matter.Engine`.
32+
* Factories for commonly used body configurations (such as rectangles, circles and other polygons) can be found in the module `Matter.Bodies`.
33+
*
34+
* @class Body
35+
* @memberOf Matter
36+
*/
37+
38+
/**
39+
* @classdesc
40+
* The `Matter.Composite` module contains methods for creating and manipulating composite bodies.
41+
* A composite body is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`, therefore composites form a tree structure.
42+
* It is important to use the functions in this module to modify composites, rather than directly modifying their properties.
43+
* Note that the `Matter.World` object is also a type of `Matter.Composite` and as such all composite methods here can also operate on a `Matter.World`.
44+
*
45+
* @class Composite
46+
* @memberOf Matter
47+
*/
48+
49+
/**
50+
* @classdesc
51+
* The `Matter.World` module contains methods for creating and manipulating the world composite.
52+
* A `Matter.World` is a `Matter.Composite` body, which is a collection of `Matter.Body`, `Matter.Constraint` and other `Matter.Composite`.
53+
* A `Matter.World` has a few additional properties including `gravity` and `bounds`.
54+
* It is important to use the functions in the `Matter.Composite` module to modify the world composite, rather than directly modifying its properties.
55+
* There are also a few methods here that alias those in `Matter.Composite` for easier readability.
56+
*
57+
* @class World
58+
* @extends Matter.Composite
59+
* @memberOf Matter
60+
*/
61+
62+
/**
63+
* @classdesc
64+
* The `Matter.Constraint` module contains methods for creating and manipulating constraints.
65+
* Constraints are used for specifying that a fixed distance must be maintained between two bodies (or a body and a fixed world-space position).
66+
* The stiffness of constraints can be modified to create springs or elastic.
67+
*
68+
* @class Constraint
69+
* @memberOf Matter
70+
*/
71+
72+
/**
73+
* @classdesc
74+
* The `Matter.Engine` module contains methods for creating and manipulating engines.
75+
* An engine is a controller that manages updating the simulation of the world.
76+
*
77+
* @class Engine
78+
* @memberOf Matter
79+
*/

src/renderer/canvas/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010

1111
module.exports = {
1212

13-
CanvasRenderer: require('./CanvasRenderer'),
1413
BlitImage: require('./utils/BlitImage'),
14+
CanvasRenderer: require('./CanvasRenderer'),
1515
DrawImage: require('./utils/DrawImage'),
1616
GetBlendModes: require('./utils/GetBlendModes')
1717

src/scene/Systems.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ var Systems = new Class({
111111
* [description]
112112
*
113113
* @name Phaser.Scenes.Systems#plugins
114-
* @type {Phaser.Plugins.PluginManager}
114+
* @type {Phaser.Boot.PluginManager}
115115
* @since 3.0.0
116116
*/
117117
this.plugins;

src/textures/index.js

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,26 @@ var Textures = {
1818
Frame: require('./Frame'),
1919
Texture: require('./Texture'),
2020
TextureManager: require('./TextureManager'),
21-
TextureSource: require('./TextureSource')
21+
TextureSource: require('./TextureSource'),
22+
23+
/**
24+
* Linear filter type.
25+
*
26+
* @name Phaser.Textures.LINEAR
27+
* @type {integer}
28+
* @since 3.0.0
29+
*/
30+
LINEAR: 0,
31+
32+
/**
33+
* Nearest neighbor filter type.
34+
*
35+
* @name Phaser.Textures.NEAREST
36+
* @type {integer}
37+
* @since 3.0.0
38+
*/
39+
NEAREST: 1
2240

2341
};
2442

25-
// Merge in the consts
26-
Textures = Extend(false, Textures, CONST);
27-
2843
module.exports = Textures;

0 commit comments

Comments
 (0)