From b50e1c78b5c1fc95ac6516e680fb2ec09056a549 Mon Sep 17 00:00:00 2001 From: Richard Davey Date: Tue, 12 Feb 2019 15:01:54 +0000 Subject: [PATCH] Lots more jsdoc tweaks and improvements --- src/const.js | 22 +++---- src/gameobjects/components/Tint.js | 2 +- src/physics/arcade/World.js | 2 +- src/physics/arcade/components/Acceleration.js | 2 +- src/physics/arcade/components/Angular.js | 2 +- src/physics/arcade/components/Bounce.js | 2 +- src/physics/arcade/components/Debug.js | 2 +- src/physics/arcade/components/Drag.js | 2 +- src/physics/arcade/components/Enable.js | 2 +- src/physics/arcade/components/Friction.js | 2 +- src/physics/arcade/components/Gravity.js | 2 +- src/physics/arcade/components/Immovable.js | 2 +- src/physics/arcade/components/Mass.js | 2 +- src/physics/arcade/components/Size.js | 2 +- src/physics/arcade/components/Velocity.js | 2 +- src/physics/impact/COLLIDES.js | 15 ++++- src/physics/impact/TYPE.js | 12 +++- src/physics/impact/components/Acceleration.js | 2 +- src/physics/impact/components/BodyScale.js | 2 +- src/physics/impact/components/BodyType.js | 2 +- src/physics/impact/components/Bounce.js | 2 +- src/physics/impact/components/CheckAgainst.js | 2 +- src/physics/impact/components/Collides.js | 2 +- src/physics/impact/components/Debug.js | 2 +- src/physics/impact/components/Friction.js | 2 +- src/physics/impact/components/Gravity.js | 2 +- src/physics/impact/components/Offset.js | 2 +- .../impact/components/SetGameObject.js | 2 +- src/physics/impact/components/Velocity.js | 2 +- src/physics/matter-js/components/Bounce.js | 2 +- src/physics/matter-js/components/Collision.js | 2 +- src/physics/matter-js/components/Force.js | 2 +- src/physics/matter-js/components/Friction.js | 2 +- src/physics/matter-js/components/Gravity.js | 2 +- src/physics/matter-js/components/Mass.js | 3 +- src/physics/matter-js/components/Sensor.js | 2 +- src/physics/matter-js/components/SetBody.js | 2 +- src/physics/matter-js/components/Sleep.js | 2 +- src/physics/matter-js/components/Static.js | 2 +- src/physics/matter-js/components/Transform.js | 2 +- src/physics/matter-js/components/Velocity.js | 2 +- src/renderer/BlendModes.js | 64 +++++++++++++++++-- src/renderer/ScaleModes.js | 10 ++- .../components/ModelViewProjection.js | 2 +- src/scale/const/CENTER_CONST.js | 8 +++ src/scale/const/ORIENTATION_CONST.js | 4 ++ src/scale/const/SCALE_MODE_CONST.js | 12 ++++ src/scale/const/ZOOM_CONST.js | 8 +++ src/textures/const.js | 8 ++- 49 files changed, 176 insertions(+), 66 deletions(-) diff --git a/src/const.js b/src/const.js index 4fe6565e0..d42924c53 100644 --- a/src/const.js +++ b/src/const.js @@ -16,7 +16,7 @@ var CONST = { * Phaser Release Version * * @name Phaser.VERSION - * @readonly + * @const * @type {string} * @since 3.0.0 */ @@ -30,7 +30,7 @@ var CONST = { * AUTO Detect Renderer. * * @name Phaser.AUTO - * @readonly + * @const * @type {integer} * @since 3.0.0 */ @@ -40,7 +40,7 @@ var CONST = { * Canvas Renderer. * * @name Phaser.CANVAS - * @readonly + * @const * @type {integer} * @since 3.0.0 */ @@ -50,7 +50,7 @@ var CONST = { * WebGL Renderer. * * @name Phaser.WEBGL - * @readonly + * @const * @type {integer} * @since 3.0.0 */ @@ -60,7 +60,7 @@ var CONST = { * Headless Renderer. * * @name Phaser.HEADLESS - * @readonly + * @const * @type {integer} * @since 3.0.0 */ @@ -71,7 +71,7 @@ var CONST = { * to help you remember what the value is doing in your code. * * @name Phaser.FOREVER - * @readonly + * @const * @type {integer} * @since 3.0.0 */ @@ -81,7 +81,7 @@ var CONST = { * Direction constant. * * @name Phaser.NONE - * @readonly + * @const * @type {integer} * @since 3.0.0 */ @@ -91,7 +91,7 @@ var CONST = { * Direction constant. * * @name Phaser.UP - * @readonly + * @const * @type {integer} * @since 3.0.0 */ @@ -101,7 +101,7 @@ var CONST = { * Direction constant. * * @name Phaser.DOWN - * @readonly + * @const * @type {integer} * @since 3.0.0 */ @@ -111,7 +111,7 @@ var CONST = { * Direction constant. * * @name Phaser.LEFT - * @readonly + * @const * @type {integer} * @since 3.0.0 */ @@ -121,7 +121,7 @@ var CONST = { * Direction constant. * * @name Phaser.RIGHT - * @readonly + * @const * @type {integer} * @since 3.0.0 */ diff --git a/src/gameobjects/components/Tint.js b/src/gameobjects/components/Tint.js index 5ab8e8c08..6db344b5e 100644 --- a/src/gameobjects/components/Tint.js +++ b/src/gameobjects/components/Tint.js @@ -18,7 +18,7 @@ var GetColor = function (value) * Provides methods used for setting the tint of a Game Object. * Should be applied as a mixin and not used directly. * - * @name Phaser.GameObjects.Components.Tint + * @namespace Phaser.GameObjects.Components.Tint * @webglOnly * @since 3.0.0 */ diff --git a/src/physics/arcade/World.js b/src/physics/arcade/World.js index 13543956c..03a8159af 100644 --- a/src/physics/arcade/World.js +++ b/src/physics/arcade/World.js @@ -307,7 +307,7 @@ var World = new Class({ * - 0.5 = double speed * * @name Phaser.Physics.Arcade.World#timeScale - * @property {number} + * @type {number} * @default 1 * @since 3.10.0 */ diff --git a/src/physics/arcade/components/Acceleration.js b/src/physics/arcade/components/Acceleration.js index 69a623555..95849feb7 100644 --- a/src/physics/arcade/components/Acceleration.js +++ b/src/physics/arcade/components/Acceleration.js @@ -7,7 +7,7 @@ /** * Provides methods used for setting the acceleration properties of an Arcade Physics Body. * - * @name Phaser.Physics.Arcade.Components.Acceleration + * @namespace Phaser.Physics.Arcade.Components.Acceleration * @since 3.0.0 */ var Acceleration = { diff --git a/src/physics/arcade/components/Angular.js b/src/physics/arcade/components/Angular.js index 09a023c3c..e0947b767 100644 --- a/src/physics/arcade/components/Angular.js +++ b/src/physics/arcade/components/Angular.js @@ -7,7 +7,7 @@ /** * Provides methods used for setting the angular acceleration properties of an Arcade Physics Body. * - * @name Phaser.Physics.Arcade.Components.Angular + * @namespace Phaser.Physics.Arcade.Components.Angular * @since 3.0.0 */ var Angular = { diff --git a/src/physics/arcade/components/Bounce.js b/src/physics/arcade/components/Bounce.js index ebd4ad975..3e41a8824 100644 --- a/src/physics/arcade/components/Bounce.js +++ b/src/physics/arcade/components/Bounce.js @@ -7,7 +7,7 @@ /** * Provides methods used for setting the bounce properties of an Arcade Physics Body. * - * @name Phaser.Physics.Arcade.Components.Bounce + * @namespace Phaser.Physics.Arcade.Components.Bounce * @since 3.0.0 */ var Bounce = { diff --git a/src/physics/arcade/components/Debug.js b/src/physics/arcade/components/Debug.js index a3baf3218..bb59aa860 100644 --- a/src/physics/arcade/components/Debug.js +++ b/src/physics/arcade/components/Debug.js @@ -7,7 +7,7 @@ /** * Provides methods used for setting the debug properties of an Arcade Physics Body. * - * @name Phaser.Physics.Arcade.Components.Debug + * @namespace Phaser.Physics.Arcade.Components.Debug * @since 3.0.0 */ var Debug = { diff --git a/src/physics/arcade/components/Drag.js b/src/physics/arcade/components/Drag.js index 6570a7ab7..affd2a384 100644 --- a/src/physics/arcade/components/Drag.js +++ b/src/physics/arcade/components/Drag.js @@ -7,7 +7,7 @@ /** * Provides methods used for setting the drag properties of an Arcade Physics Body. * - * @name Phaser.Physics.Arcade.Components.Drag + * @namespace Phaser.Physics.Arcade.Components.Drag * @since 3.0.0 */ var Drag = { diff --git a/src/physics/arcade/components/Enable.js b/src/physics/arcade/components/Enable.js index 51260affc..9d68fc241 100644 --- a/src/physics/arcade/components/Enable.js +++ b/src/physics/arcade/components/Enable.js @@ -7,7 +7,7 @@ /** * Provides methods used for setting the enable properties of an Arcade Physics Body. * - * @name Phaser.Physics.Arcade.Components.Enable + * @namespace Phaser.Physics.Arcade.Components.Enable * @since 3.0.0 */ var Enable = { diff --git a/src/physics/arcade/components/Friction.js b/src/physics/arcade/components/Friction.js index 0fcc0ec21..935ffd445 100644 --- a/src/physics/arcade/components/Friction.js +++ b/src/physics/arcade/components/Friction.js @@ -7,7 +7,7 @@ /** * Sets the friction (e.g. the amount of velocity reduced over time) of the physics body when moving horizontally in the X axis. The higher than friction, the faster the body will slow down once force stops being applied to it. * - * @name Phaser.Physics.Arcade.Components.Friction + * @namespace Phaser.Physics.Arcade.Components.Friction * @since 3.0.0 */ var Friction = { diff --git a/src/physics/arcade/components/Gravity.js b/src/physics/arcade/components/Gravity.js index e75e38631..f0fac4054 100644 --- a/src/physics/arcade/components/Gravity.js +++ b/src/physics/arcade/components/Gravity.js @@ -8,7 +8,7 @@ * Provides methods for setting the gravity properties of an Arcade Physics Game Object. * Should be applied as a mixin and not used directly. * - * @name Phaser.Physics.Arcade.Components.Gravity + * @namespace Phaser.Physics.Arcade.Components.Gravity * @since 3.0.0 */ var Gravity = { diff --git a/src/physics/arcade/components/Immovable.js b/src/physics/arcade/components/Immovable.js index 54927d16f..bbd7b64f8 100644 --- a/src/physics/arcade/components/Immovable.js +++ b/src/physics/arcade/components/Immovable.js @@ -7,7 +7,7 @@ /** * Provides methods used for setting the immovable properties of an Arcade Physics Body. * - * @name Phaser.Physics.Arcade.Components.Immovable + * @namespace Phaser.Physics.Arcade.Components.Immovable * @since 3.0.0 */ var Immovable = { diff --git a/src/physics/arcade/components/Mass.js b/src/physics/arcade/components/Mass.js index 7ae274141..3ea184efb 100644 --- a/src/physics/arcade/components/Mass.js +++ b/src/physics/arcade/components/Mass.js @@ -7,7 +7,7 @@ /** * Provides methods used for setting the mass properties of an Arcade Physics Body. * - * @name Phaser.Physics.Arcade.Components.Mass + * @namespace Phaser.Physics.Arcade.Components.Mass * @since 3.0.0 */ var Mass = { diff --git a/src/physics/arcade/components/Size.js b/src/physics/arcade/components/Size.js index c67153412..9cdb1c11a 100644 --- a/src/physics/arcade/components/Size.js +++ b/src/physics/arcade/components/Size.js @@ -8,7 +8,7 @@ * Provides methods for setting the size of an Arcade Physics Game Object. * Should be applied as a mixin and not used directly. * - * @name Phaser.Physics.Arcade.Components.Size + * @namespace Phaser.Physics.Arcade.Components.Size * @since 3.0.0 */ var Size = { diff --git a/src/physics/arcade/components/Velocity.js b/src/physics/arcade/components/Velocity.js index c2bf75d2f..669c59443 100644 --- a/src/physics/arcade/components/Velocity.js +++ b/src/physics/arcade/components/Velocity.js @@ -9,7 +9,7 @@ * * Should be applied as a mixin and not used directly. * - * @name Phaser.Physics.Arcade.Components.Velocity + * @namespace Phaser.Physics.Arcade.Components.Velocity * @since 3.0.0 */ var Velocity = { diff --git a/src/physics/impact/COLLIDES.js b/src/physics/impact/COLLIDES.js index fbbb5f3c3..249490f39 100644 --- a/src/physics/impact/COLLIDES.js +++ b/src/physics/impact/COLLIDES.js @@ -13,18 +13,19 @@ * with other LITE or PASSIVE entities at all. The behavior for FIXED vs. * FIXED collisions is undefined. * - * @name Phaser.Physics.Impact.COLLIDES - * @enum {integer} + * @namespace Phaser.Physics.Impact.COLLIDES * @memberof Phaser.Physics.Impact - * @readonly * @since 3.0.0 */ + module.exports = { /** * Never collides. * * @name Phaser.Physics.Impact.COLLIDES.NEVER + * @type {integer} + * @const * @since 3.0.0 */ NEVER: 0, @@ -33,6 +34,8 @@ module.exports = { * Lite collision. * * @name Phaser.Physics.Impact.COLLIDES.LITE + * @type {integer} + * @const * @since 3.0.0 */ LITE: 1, @@ -41,6 +44,8 @@ module.exports = { * Passive collision. * * @name Phaser.Physics.Impact.COLLIDES.PASSIVE + * @type {integer} + * @const * @since 3.0.0 */ PASSIVE: 2, @@ -49,6 +54,8 @@ module.exports = { * Active collision. * * @name Phaser.Physics.Impact.COLLIDES.ACTIVE + * @type {integer} + * @const * @since 3.0.0 */ ACTIVE: 4, @@ -57,6 +64,8 @@ module.exports = { * Fixed collision. * * @name Phaser.Physics.Impact.COLLIDES.FIXED + * @type {integer} + * @const * @since 3.0.0 */ FIXED: 8 diff --git a/src/physics/impact/TYPE.js b/src/physics/impact/TYPE.js index 83b17ce9e..6908940e1 100644 --- a/src/physics/impact/TYPE.js +++ b/src/physics/impact/TYPE.js @@ -13,10 +13,8 @@ * with other LITE or PASSIVE entities at all. The behavior for FIXED vs. * FIXED collisions is undefined. * - * @name Phaser.Physics.Impact.TYPE - * @enum {integer} + * @namespace Phaser.Physics.Impact.TYPE * @memberof Phaser.Physics.Impact - * @readonly * @since 3.0.0 */ module.exports = { @@ -25,6 +23,8 @@ module.exports = { * Collides with nothing. * * @name Phaser.Physics.Impact.TYPE.NONE + * @type {integer} + * @const * @since 3.0.0 */ NONE: 0, @@ -33,6 +33,8 @@ module.exports = { * Type A. Collides with Type B. * * @name Phaser.Physics.Impact.TYPE.A + * @type {integer} + * @const * @since 3.0.0 */ A: 1, @@ -41,6 +43,8 @@ module.exports = { * Type B. Collides with Type A. * * @name Phaser.Physics.Impact.TYPE.B + * @type {integer} + * @const * @since 3.0.0 */ B: 2, @@ -49,6 +53,8 @@ module.exports = { * Collides with both types A and B. * * @name Phaser.Physics.Impact.TYPE.BOTH + * @type {integer} + * @const * @since 3.0.0 */ BOTH: 3 diff --git a/src/physics/impact/components/Acceleration.js b/src/physics/impact/components/Acceleration.js index ef5ad75f6..42e1fcb36 100644 --- a/src/physics/impact/components/Acceleration.js +++ b/src/physics/impact/components/Acceleration.js @@ -8,7 +8,7 @@ * The Impact Acceleration component. * Should be applied as a mixin. * - * @name Phaser.Physics.Impact.Components.Acceleration + * @namespace Phaser.Physics.Impact.Components.Acceleration * @since 3.0.0 */ var Acceleration = { diff --git a/src/physics/impact/components/BodyScale.js b/src/physics/impact/components/BodyScale.js index dc30628ee..affab2158 100644 --- a/src/physics/impact/components/BodyScale.js +++ b/src/physics/impact/components/BodyScale.js @@ -8,7 +8,7 @@ * The Impact Body Scale component. * Should be applied as a mixin. * - * @name Phaser.Physics.Impact.Components.BodyScale + * @namespace Phaser.Physics.Impact.Components.BodyScale * @since 3.0.0 */ var BodyScale = { diff --git a/src/physics/impact/components/BodyType.js b/src/physics/impact/components/BodyType.js index 116f5d84d..c96777379 100644 --- a/src/physics/impact/components/BodyType.js +++ b/src/physics/impact/components/BodyType.js @@ -10,7 +10,7 @@ var TYPE = require('../TYPE'); * The Impact Body Type component. * Should be applied as a mixin. * - * @name Phaser.Physics.Impact.Components.BodyType + * @namespace Phaser.Physics.Impact.Components.BodyType * @since 3.0.0 */ var BodyType = { diff --git a/src/physics/impact/components/Bounce.js b/src/physics/impact/components/Bounce.js index 0669ab9cb..9f61b4c0d 100644 --- a/src/physics/impact/components/Bounce.js +++ b/src/physics/impact/components/Bounce.js @@ -8,7 +8,7 @@ * The Impact Bounce component. * Should be applied as a mixin. * - * @name Phaser.Physics.Impact.Components.Bounce + * @namespace Phaser.Physics.Impact.Components.Bounce * @since 3.0.0 */ var Bounce = { diff --git a/src/physics/impact/components/CheckAgainst.js b/src/physics/impact/components/CheckAgainst.js index 3303d2c78..41d66dde3 100644 --- a/src/physics/impact/components/CheckAgainst.js +++ b/src/physics/impact/components/CheckAgainst.js @@ -10,7 +10,7 @@ var TYPE = require('../TYPE'); * The Impact Check Against component. * Should be applied as a mixin. * - * @name Phaser.Physics.Impact.Components.CheckAgainst + * @namespace Phaser.Physics.Impact.Components.CheckAgainst * @since 3.0.0 */ var CheckAgainst = { diff --git a/src/physics/impact/components/Collides.js b/src/physics/impact/components/Collides.js index d014c530a..603f234a6 100644 --- a/src/physics/impact/components/Collides.js +++ b/src/physics/impact/components/Collides.js @@ -18,7 +18,7 @@ var COLLIDES = require('../COLLIDES'); * The Impact Collides component. * Should be applied as a mixin. * - * @name Phaser.Physics.Impact.Components.Collides + * @namespace Phaser.Physics.Impact.Components.Collides * @since 3.0.0 */ var Collides = { diff --git a/src/physics/impact/components/Debug.js b/src/physics/impact/components/Debug.js index 7c9499f1a..9d524bb00 100644 --- a/src/physics/impact/components/Debug.js +++ b/src/physics/impact/components/Debug.js @@ -8,7 +8,7 @@ * The Impact Debug component. * Should be applied as a mixin. * - * @name Phaser.Physics.Impact.Components.Debug + * @namespace Phaser.Physics.Impact.Components.Debug * @since 3.0.0 */ var Debug = { diff --git a/src/physics/impact/components/Friction.js b/src/physics/impact/components/Friction.js index 347d8fb22..ef7e8f9fb 100644 --- a/src/physics/impact/components/Friction.js +++ b/src/physics/impact/components/Friction.js @@ -8,7 +8,7 @@ * The Impact Friction component. * Should be applied as a mixin. * - * @name Phaser.Physics.Impact.Components.Friction + * @namespace Phaser.Physics.Impact.Components.Friction * @since 3.0.0 */ var Friction = { diff --git a/src/physics/impact/components/Gravity.js b/src/physics/impact/components/Gravity.js index 800920995..c1b6519b5 100644 --- a/src/physics/impact/components/Gravity.js +++ b/src/physics/impact/components/Gravity.js @@ -8,7 +8,7 @@ * The Impact Gravity component. * Should be applied as a mixin. * - * @name Phaser.Physics.Impact.Components.Gravity + * @namespace Phaser.Physics.Impact.Components.Gravity * @since 3.0.0 */ var Gravity = { diff --git a/src/physics/impact/components/Offset.js b/src/physics/impact/components/Offset.js index 17be4f97b..bc45e4504 100644 --- a/src/physics/impact/components/Offset.js +++ b/src/physics/impact/components/Offset.js @@ -8,7 +8,7 @@ * The Impact Offset component. * Should be applied as a mixin. * - * @name Phaser.Physics.Impact.Components.Offset + * @namespace Phaser.Physics.Impact.Components.Offset * @since 3.0.0 */ var Offset = { diff --git a/src/physics/impact/components/SetGameObject.js b/src/physics/impact/components/SetGameObject.js index 7f31f653e..16e6b8278 100644 --- a/src/physics/impact/components/SetGameObject.js +++ b/src/physics/impact/components/SetGameObject.js @@ -8,7 +8,7 @@ * The Impact Set Game Object component. * Should be applied as a mixin. * - * @name Phaser.Physics.Impact.Components.SetGameObject + * @namespace Phaser.Physics.Impact.Components.SetGameObject * @since 3.0.0 */ var SetGameObject = { diff --git a/src/physics/impact/components/Velocity.js b/src/physics/impact/components/Velocity.js index bf9f675f7..12e31e91c 100644 --- a/src/physics/impact/components/Velocity.js +++ b/src/physics/impact/components/Velocity.js @@ -8,7 +8,7 @@ * The Impact Velocity component. * Should be applied as a mixin. * - * @name Phaser.Physics.Impact.Components.Velocity + * @namespace Phaser.Physics.Impact.Components.Velocity * @since 3.0.0 */ var Velocity = { diff --git a/src/physics/matter-js/components/Bounce.js b/src/physics/matter-js/components/Bounce.js index a7e3c9fe5..a4f623ba7 100644 --- a/src/physics/matter-js/components/Bounce.js +++ b/src/physics/matter-js/components/Bounce.js @@ -7,7 +7,7 @@ /** * A component to set restitution on objects. * - * @name Phaser.Physics.Matter.Components.Bounce + * @namespace Phaser.Physics.Matter.Components.Bounce * @since 3.0.0 */ var Bounce = { diff --git a/src/physics/matter-js/components/Collision.js b/src/physics/matter-js/components/Collision.js index 75d028041..de36a37aa 100644 --- a/src/physics/matter-js/components/Collision.js +++ b/src/physics/matter-js/components/Collision.js @@ -7,7 +7,7 @@ /** * Contains methods for changing the collision filter of a Matter Body. Should be used as a mixin and not called directly. * - * @name Phaser.Physics.Matter.Components.Collision + * @namespace Phaser.Physics.Matter.Components.Collision * @since 3.0.0 */ var Collision = { diff --git a/src/physics/matter-js/components/Force.js b/src/physics/matter-js/components/Force.js index de1447d47..b10317709 100644 --- a/src/physics/matter-js/components/Force.js +++ b/src/physics/matter-js/components/Force.js @@ -9,7 +9,7 @@ var Body = require('../lib/body/Body'); /** * A component to apply force to Matter.js bodies. * - * @name Phaser.Physics.Matter.Components.Force + * @namespace Phaser.Physics.Matter.Components.Force * @since 3.0.0 */ var Force = { diff --git a/src/physics/matter-js/components/Friction.js b/src/physics/matter-js/components/Friction.js index 2f589578c..7bc5f3621 100644 --- a/src/physics/matter-js/components/Friction.js +++ b/src/physics/matter-js/components/Friction.js @@ -7,7 +7,7 @@ /** * Contains methods for changing the friction of a Game Object's Matter Body. Should be used a mixin, not called directly. * - * @name Phaser.Physics.Matter.Components.Friction + * @namespace Phaser.Physics.Matter.Components.Friction * @since 3.0.0 */ var Friction = { diff --git a/src/physics/matter-js/components/Gravity.js b/src/physics/matter-js/components/Gravity.js index 86f1f2066..1b64a6103 100644 --- a/src/physics/matter-js/components/Gravity.js +++ b/src/physics/matter-js/components/Gravity.js @@ -7,7 +7,7 @@ /** * A component to manipulate world gravity for Matter.js bodies. * - * @name Phaser.Physics.Matter.Components.Gravity + * @namespace Phaser.Physics.Matter.Components.Gravity * @since 3.0.0 */ var Gravity = { diff --git a/src/physics/matter-js/components/Mass.js b/src/physics/matter-js/components/Mass.js index 5111afe99..59f2948a7 100644 --- a/src/physics/matter-js/components/Mass.js +++ b/src/physics/matter-js/components/Mass.js @@ -10,7 +10,7 @@ var Vector2 = require('../../../math/Vector2'); /** * Allows accessing the mass, density, and center of mass of a Matter-enabled Game Object. Should be used as a mixin and not directly. * - * @name Phaser.Physics.Matter.Components.Mass + * @namespace Phaser.Physics.Matter.Components.Mass * @since 3.0.0 */ var Mass = { @@ -53,6 +53,7 @@ var Mass = { * The body's center of mass. * * @name Phaser.Physics.Matter.Components.Mass#centerOfMass + * @type {Phaser.Math.Vector2} * @readonly * @since 3.10.0 * diff --git a/src/physics/matter-js/components/Sensor.js b/src/physics/matter-js/components/Sensor.js index 4f9c4f4b4..4f37a0c9f 100644 --- a/src/physics/matter-js/components/Sensor.js +++ b/src/physics/matter-js/components/Sensor.js @@ -7,7 +7,7 @@ /** * [description] * - * @name Phaser.Physics.Matter.Components.Sensor + * @namespace Phaser.Physics.Matter.Components.Sensor * @since 3.0.0 */ var Sensor = { diff --git a/src/physics/matter-js/components/SetBody.js b/src/physics/matter-js/components/SetBody.js index 4502e6aa5..877cbd2ff 100644 --- a/src/physics/matter-js/components/SetBody.js +++ b/src/physics/matter-js/components/SetBody.js @@ -13,7 +13,7 @@ var Vertices = require('../lib/geometry/Vertices'); /** * [description] * - * @name Phaser.Physics.Matter.Components.SetBody + * @namespace Phaser.Physics.Matter.Components.SetBody * @since 3.0.0 */ var SetBody = { diff --git a/src/physics/matter-js/components/Sleep.js b/src/physics/matter-js/components/Sleep.js index 5bdc14821..1308491dc 100644 --- a/src/physics/matter-js/components/Sleep.js +++ b/src/physics/matter-js/components/Sleep.js @@ -10,7 +10,7 @@ var MatterEvents = require('../lib/core/Events'); /** * [description] * - * @name Phaser.Physics.Matter.Components.Sleep + * @namespace Phaser.Physics.Matter.Components.Sleep * @since 3.0.0 */ var Sleep = { diff --git a/src/physics/matter-js/components/Static.js b/src/physics/matter-js/components/Static.js index 5333ace40..ba646f96e 100644 --- a/src/physics/matter-js/components/Static.js +++ b/src/physics/matter-js/components/Static.js @@ -9,7 +9,7 @@ var Body = require('../lib/body/Body'); /** * [description] * - * @name Phaser.Physics.Matter.Components.Static + * @namespace Phaser.Physics.Matter.Components.Static * @since 3.0.0 */ var Static = { diff --git a/src/physics/matter-js/components/Transform.js b/src/physics/matter-js/components/Transform.js index 26ececf4a..5546abf0e 100644 --- a/src/physics/matter-js/components/Transform.js +++ b/src/physics/matter-js/components/Transform.js @@ -17,7 +17,7 @@ var _FLAG = 4; // 0100 /** * Provides methods used for getting and setting the position, scale and rotation of a Game Object. * - * @name Phaser.Physics.Matter.Components.Transform + * @namespace Phaser.Physics.Matter.Components.Transform * @since 3.0.0 */ var Transform = { diff --git a/src/physics/matter-js/components/Velocity.js b/src/physics/matter-js/components/Velocity.js index 9dd6f2784..569208420 100644 --- a/src/physics/matter-js/components/Velocity.js +++ b/src/physics/matter-js/components/Velocity.js @@ -9,7 +9,7 @@ var Body = require('../lib/body/Body'); /** * [description] * - * @name Phaser.Physics.Matter.Components.Velocity + * @namespace Phaser.Physics.Matter.Components.Velocity * @since 3.0.0 */ var Velocity = { diff --git a/src/renderer/BlendModes.js b/src/renderer/BlendModes.js index 602181f3c..7f5d18b58 100644 --- a/src/renderer/BlendModes.js +++ b/src/renderer/BlendModes.js @@ -7,10 +7,8 @@ /** * Phaser Blend Modes. * - * @name Phaser.BlendModes - * @enum {integer} + * @namespace Phaser.BlendModes * @memberof Phaser - * @readonly * @since 3.0.0 */ @@ -20,6 +18,8 @@ module.exports = { * Skips the Blend Mode check in the renderer. * * @name Phaser.BlendModes.SKIP_CHECK + * @type {integer} + * @const * @since 3.0.0 */ SKIP_CHECK: -1, @@ -29,6 +29,8 @@ module.exports = { * This is the default setting and draws new shapes on top of the existing canvas content. * * @name Phaser.BlendModes.NORMAL + * @type {integer} + * @const * @since 3.0.0 */ NORMAL: 0, @@ -38,6 +40,8 @@ module.exports = { * Where both shapes overlap the color is determined by adding color values. * * @name Phaser.BlendModes.ADD + * @type {integer} + * @const * @since 3.0.0 */ ADD: 1, @@ -47,6 +51,8 @@ module.exports = { * The pixels are of the top layer are multiplied with the corresponding pixel of the bottom layer. A darker picture is the result. * * @name Phaser.BlendModes.MULTIPLY + * @type {integer} + * @const * @since 3.0.0 */ MULTIPLY: 2, @@ -56,6 +62,8 @@ module.exports = { * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply) * * @name Phaser.BlendModes.SCREEN + * @type {integer} + * @const * @since 3.0.0 */ SCREEN: 3, @@ -65,6 +73,8 @@ module.exports = { * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter. * * @name Phaser.BlendModes.OVERLAY + * @type {integer} + * @const * @since 3.0.0 */ OVERLAY: 4, @@ -74,6 +84,8 @@ module.exports = { * Retains the darkest pixels of both layers. * * @name Phaser.BlendModes.DARKEN + * @type {integer} + * @const * @since 3.0.0 */ DARKEN: 5, @@ -83,6 +95,8 @@ module.exports = { * Retains the lightest pixels of both layers. * * @name Phaser.BlendModes.LIGHTEN + * @type {integer} + * @const * @since 3.0.0 */ LIGHTEN: 6, @@ -92,6 +106,8 @@ module.exports = { * Divides the bottom layer by the inverted top layer. * * @name Phaser.BlendModes.COLOR_DODGE + * @type {integer} + * @const * @since 3.0.0 */ COLOR_DODGE: 7, @@ -101,6 +117,8 @@ module.exports = { * Divides the inverted bottom layer by the top layer, and then inverts the result. * * @name Phaser.BlendModes.COLOR_BURN + * @type {integer} + * @const * @since 3.0.0 */ COLOR_BURN: 8, @@ -110,6 +128,8 @@ module.exports = { * A combination of multiply and screen like overlay, but with top and bottom layer swapped. * * @name Phaser.BlendModes.HARD_LIGHT + * @type {integer} + * @const * @since 3.0.0 */ HARD_LIGHT: 9, @@ -119,6 +139,8 @@ module.exports = { * A softer version of hard-light. Pure black or white does not result in pure black or white. * * @name Phaser.BlendModes.SOFT_LIGHT + * @type {integer} + * @const * @since 3.0.0 */ SOFT_LIGHT: 10, @@ -128,6 +150,8 @@ module.exports = { * Subtracts the bottom layer from the top layer or the other way round to always get a positive value. * * @name Phaser.BlendModes.DIFFERENCE + * @type {integer} + * @const * @since 3.0.0 */ DIFFERENCE: 11, @@ -137,6 +161,8 @@ module.exports = { * Like difference, but with lower contrast. * * @name Phaser.BlendModes.EXCLUSION + * @type {integer} + * @const * @since 3.0.0 */ EXCLUSION: 12, @@ -146,6 +172,8 @@ module.exports = { * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer. * * @name Phaser.BlendModes.HUE + * @type {integer} + * @const * @since 3.0.0 */ HUE: 13, @@ -155,6 +183,8 @@ module.exports = { * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer. * * @name Phaser.BlendModes.SATURATION + * @type {integer} + * @const * @since 3.0.0 */ SATURATION: 14, @@ -164,6 +194,8 @@ module.exports = { * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer. * * @name Phaser.BlendModes.COLOR + * @type {integer} + * @const * @since 3.0.0 */ COLOR: 15, @@ -173,6 +205,8 @@ module.exports = { * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer. * * @name Phaser.BlendModes.LUMINOSITY + * @type {integer} + * @const * @since 3.0.0 */ LUMINOSITY: 16, @@ -181,6 +215,8 @@ module.exports = { * Alpha erase blend mode. For Canvas and WebGL. * * @name Phaser.BlendModes.ERASE + * @type {integer} + * @const * @since 3.0.0 */ ERASE: 17, @@ -190,6 +226,8 @@ module.exports = { * The new shape is drawn only where both the new shape and the destination canvas overlap. Everything else is made transparent. * * @name Phaser.BlendModes.SOURCE_IN + * @type {integer} + * @const * @since 3.0.0 */ SOURCE_IN: 18, @@ -199,6 +237,8 @@ module.exports = { * The new shape is drawn where it doesn't overlap the existing canvas content. * * @name Phaser.BlendModes.SOURCE_OUT + * @type {integer} + * @const * @since 3.0.0 */ SOURCE_OUT: 19, @@ -208,6 +248,8 @@ module.exports = { * The new shape is only drawn where it overlaps the existing canvas content. * * @name Phaser.BlendModes.SOURCE_ATOP + * @type {integer} + * @const * @since 3.0.0 */ SOURCE_ATOP: 20, @@ -217,6 +259,8 @@ module.exports = { * New shapes are drawn behind the existing canvas content. * * @name Phaser.BlendModes.DESTINATION_OVER + * @type {integer} + * @const * @since 3.0.0 */ DESTINATION_OVER: 21, @@ -226,6 +270,8 @@ module.exports = { * The existing canvas content is kept where both the new shape and existing canvas content overlap. Everything else is made transparent. * * @name Phaser.BlendModes.DESTINATION_IN + * @type {integer} + * @const * @since 3.0.0 */ DESTINATION_IN: 22, @@ -235,6 +281,8 @@ module.exports = { * The existing content is kept where it doesn't overlap the new shape. * * @name Phaser.BlendModes.DESTINATION_OUT + * @type {integer} + * @const * @since 3.0.0 */ DESTINATION_OUT: 23, @@ -244,6 +292,8 @@ module.exports = { * The existing canvas is only kept where it overlaps the new shape. The new shape is drawn behind the canvas content. * * @name Phaser.BlendModes.DESTINATION_ATOP + * @type {integer} + * @const * @since 3.0.0 */ DESTINATION_ATOP: 24, @@ -253,6 +303,8 @@ module.exports = { * Where both shapes overlap the color is determined by adding color values. * * @name Phaser.BlendModes.LIGHTER + * @type {integer} + * @const * @since 3.0.0 */ LIGHTER: 25, @@ -262,15 +314,19 @@ module.exports = { * Only the new shape is shown. * * @name Phaser.BlendModes.COPY + * @type {integer} + * @const * @since 3.0.0 */ COPY: 26, /** - * xor blend mode. For Canvas only. + * Xor blend mode. For Canvas only. * Shapes are made transparent where both overlap and drawn normal everywhere else. * * @name Phaser.BlendModes.XOR + * @type {integer} + * @const * @since 3.0.0 */ XOR: 27 diff --git a/src/renderer/ScaleModes.js b/src/renderer/ScaleModes.js index 7645a91c5..d84dd66b4 100644 --- a/src/renderer/ScaleModes.js +++ b/src/renderer/ScaleModes.js @@ -7,10 +7,8 @@ /** * Phaser Scale Modes. * - * @name Phaser.ScaleModes - * @enum {integer} + * @namespace Phaser.ScaleModes * @memberof Phaser - * @readonly * @since 3.0.0 */ @@ -20,6 +18,8 @@ module.exports = { * Default Scale Mode (Linear). * * @name Phaser.ScaleModes.DEFAULT + * @type {integer} + * @const * @since 3.0.0 */ DEFAULT: 0, @@ -28,6 +28,8 @@ module.exports = { * Linear Scale Mode. * * @name Phaser.ScaleModes.LINEAR + * @type {integer} + * @const * @since 3.0.0 */ LINEAR: 0, @@ -36,6 +38,8 @@ module.exports = { * Nearest Scale Mode. * * @name Phaser.ScaleModes.NEAREST + * @type {integer} + * @const * @since 3.0.0 */ NEAREST: 1 diff --git a/src/renderer/webgl/pipelines/components/ModelViewProjection.js b/src/renderer/webgl/pipelines/components/ModelViewProjection.js index b5a67cb79..532506ee5 100644 --- a/src/renderer/webgl/pipelines/components/ModelViewProjection.js +++ b/src/renderer/webgl/pipelines/components/ModelViewProjection.js @@ -8,7 +8,7 @@ * Implements a model view projection matrices. * Pipelines can implement this for doing 2D and 3D rendering. * - * @name Phaser.Renderer.WebGL.Pipelines.ModelViewProjection + * @namespace Phaser.Renderer.WebGL.Pipelines.ModelViewProjection * @since 3.0.0 */ var ModelViewProjection = { diff --git a/src/scale/const/CENTER_CONST.js b/src/scale/const/CENTER_CONST.js index b1968b44b..2298fb079 100644 --- a/src/scale/const/CENTER_CONST.js +++ b/src/scale/const/CENTER_CONST.js @@ -29,6 +29,8 @@ module.exports = { * You can still center it yourself via CSS. * * @name Phaser.Scale.Center.NO_CENTER + * @type {integer} + * @const * @since 3.16.0 */ NO_CENTER: 0, @@ -41,6 +43,8 @@ module.exports = { * game canvas, and does not factor in any other CSS styles you may have applied. * * @name Phaser.Scale.Center.CENTER_BOTH + * @type {integer} + * @const * @since 3.16.0 */ CENTER_BOTH: 1, @@ -53,6 +57,8 @@ module.exports = { * game canvas, and does not factor in any other CSS styles you may have applied. * * @name Phaser.Scale.Center.CENTER_HORIZONTALLY + * @type {integer} + * @const * @since 3.16.0 */ CENTER_HORIZONTALLY: 2, @@ -65,6 +71,8 @@ module.exports = { * game canvas, and does not factor in any other CSS styles you may have applied. * * @name Phaser.Scale.Center.CENTER_VERTICALLY + * @type {integer} + * @const * @since 3.16.0 */ CENTER_VERTICALLY: 3 diff --git a/src/scale/const/ORIENTATION_CONST.js b/src/scale/const/ORIENTATION_CONST.js index f3452f833..e1b30c3fd 100644 --- a/src/scale/const/ORIENTATION_CONST.js +++ b/src/scale/const/ORIENTATION_CONST.js @@ -28,6 +28,8 @@ module.exports = { * A landscape orientation. * * @name Phaser.Scale.Orientation.LANDSCAPE + * @type {string} + * @const * @since 3.16.0 */ LANDSCAPE: 'landscape-primary', @@ -36,6 +38,8 @@ module.exports = { * A portrait orientation. * * @name Phaser.Scale.Orientation.PORTRAIT + * @type {string} + * @const * @since 3.16.0 */ PORTRAIT: 'portrait-primary' diff --git a/src/scale/const/SCALE_MODE_CONST.js b/src/scale/const/SCALE_MODE_CONST.js index 0377bf344..172da66f1 100644 --- a/src/scale/const/SCALE_MODE_CONST.js +++ b/src/scale/const/SCALE_MODE_CONST.js @@ -30,6 +30,8 @@ module.exports = { * to call the Scale Managers `resize` method to give the new dimensions, or input events will stop working. * * @name Phaser.Scale.ScaleModes.NONE + * @type {integer} + * @const * @since 3.16.0 */ NONE: 0, @@ -38,6 +40,8 @@ module.exports = { * The height is automatically adjusted based on the width. * * @name Phaser.Scale.ScaleModes.WIDTH_CONTROLS_HEIGHT + * @type {integer} + * @const * @since 3.16.0 */ WIDTH_CONTROLS_HEIGHT: 1, @@ -46,6 +50,8 @@ module.exports = { * The width is automatically adjusted based on the height. * * @name Phaser.Scale.ScaleModes.HEIGHT_CONTROLS_WIDTH + * @type {integer} + * @const * @since 3.16.0 */ HEIGHT_CONTROLS_WIDTH: 2, @@ -56,6 +62,8 @@ module.exports = { * inside the area which is not covered. * * @name Phaser.Scale.ScaleModes.FIT + * @type {integer} + * @const * @since 3.16.0 */ FIT: 3, @@ -65,6 +73,8 @@ module.exports = { * area while keeping the aspect ratio. This may extend further out than the target size. * * @name Phaser.Scale.ScaleModes.ENVELOP + * @type {integer} + * @const * @since 3.16.0 */ ENVELOP: 4, @@ -73,6 +83,8 @@ module.exports = { * The Canvas is resized to fit all available _parent_ space, regardless of aspect ratio. * * @name Phaser.Scale.ScaleModes.RESIZE + * @type {integer} + * @const * @since 3.16.0 */ RESIZE: 5 diff --git a/src/scale/const/ZOOM_CONST.js b/src/scale/const/ZOOM_CONST.js index 4fbe7160b..5944a62b0 100644 --- a/src/scale/const/ZOOM_CONST.js +++ b/src/scale/const/ZOOM_CONST.js @@ -28,6 +28,8 @@ module.exports = { * The game canvas will not be zoomed by Phaser. * * @name Phaser.Scale.Zoom.NO_ZOOM + * @type {integer} + * @const * @since 3.16.0 */ NO_ZOOM: 1, @@ -36,6 +38,8 @@ module.exports = { * The game canvas will be 2x zoomed by Phaser. * * @name Phaser.Scale.Zoom.ZOOM_2X + * @type {integer} + * @const * @since 3.16.0 */ ZOOM_2X: 2, @@ -44,6 +48,8 @@ module.exports = { * The game canvas will be 4x zoomed by Phaser. * * @name Phaser.Scale.Zoom.ZOOM_4X + * @type {integer} + * @const * @since 3.16.0 */ ZOOM_4X: 4, @@ -53,6 +59,8 @@ module.exports = { * fit into the parent, or browser window if no parent is set. * * @name Phaser.Scale.Zoom.MAX_ZOOM + * @type {integer} + * @const * @since 3.16.0 */ MAX_ZOOM: -1 diff --git a/src/textures/const.js b/src/textures/const.js index 0542c15f8..ca08d5128 100644 --- a/src/textures/const.js +++ b/src/textures/const.js @@ -7,10 +7,8 @@ /** * Filter Types. * - * @name Phaser.Textures.FilterMode - * @enum {integer} + * @namespace Phaser.Textures.FilterMode * @memberof Phaser.Textures - * @readonly * @since 3.0.0 */ var CONST = { @@ -19,6 +17,8 @@ var CONST = { * Linear filter type. * * @name Phaser.Textures.FilterMode.LINEAR + * @type {integer} + * @const * @since 3.0.0 */ LINEAR: 0, @@ -27,6 +27,8 @@ var CONST = { * Nearest neighbor filter type. * * @name Phaser.Textures.FilterMode.NEAREST + * @type {integer} + * @const * @since 3.0.0 */ NEAREST: 1