Lots more jsdoc tweaks and improvements

This commit is contained in:
Richard Davey 2019-02-12 15:01:54 +00:00
parent c8439393fb
commit b50e1c78b5
49 changed files with 176 additions and 66 deletions

View file

@ -16,7 +16,7 @@ var CONST = {
* Phaser Release Version * Phaser Release Version
* *
* @name Phaser.VERSION * @name Phaser.VERSION
* @readonly * @const
* @type {string} * @type {string}
* @since 3.0.0 * @since 3.0.0
*/ */
@ -30,7 +30,7 @@ var CONST = {
* AUTO Detect Renderer. * AUTO Detect Renderer.
* *
* @name Phaser.AUTO * @name Phaser.AUTO
* @readonly * @const
* @type {integer} * @type {integer}
* @since 3.0.0 * @since 3.0.0
*/ */
@ -40,7 +40,7 @@ var CONST = {
* Canvas Renderer. * Canvas Renderer.
* *
* @name Phaser.CANVAS * @name Phaser.CANVAS
* @readonly * @const
* @type {integer} * @type {integer}
* @since 3.0.0 * @since 3.0.0
*/ */
@ -50,7 +50,7 @@ var CONST = {
* WebGL Renderer. * WebGL Renderer.
* *
* @name Phaser.WEBGL * @name Phaser.WEBGL
* @readonly * @const
* @type {integer} * @type {integer}
* @since 3.0.0 * @since 3.0.0
*/ */
@ -60,7 +60,7 @@ var CONST = {
* Headless Renderer. * Headless Renderer.
* *
* @name Phaser.HEADLESS * @name Phaser.HEADLESS
* @readonly * @const
* @type {integer} * @type {integer}
* @since 3.0.0 * @since 3.0.0
*/ */
@ -71,7 +71,7 @@ var CONST = {
* to help you remember what the value is doing in your code. * to help you remember what the value is doing in your code.
* *
* @name Phaser.FOREVER * @name Phaser.FOREVER
* @readonly * @const
* @type {integer} * @type {integer}
* @since 3.0.0 * @since 3.0.0
*/ */
@ -81,7 +81,7 @@ var CONST = {
* Direction constant. * Direction constant.
* *
* @name Phaser.NONE * @name Phaser.NONE
* @readonly * @const
* @type {integer} * @type {integer}
* @since 3.0.0 * @since 3.0.0
*/ */
@ -91,7 +91,7 @@ var CONST = {
* Direction constant. * Direction constant.
* *
* @name Phaser.UP * @name Phaser.UP
* @readonly * @const
* @type {integer} * @type {integer}
* @since 3.0.0 * @since 3.0.0
*/ */
@ -101,7 +101,7 @@ var CONST = {
* Direction constant. * Direction constant.
* *
* @name Phaser.DOWN * @name Phaser.DOWN
* @readonly * @const
* @type {integer} * @type {integer}
* @since 3.0.0 * @since 3.0.0
*/ */
@ -111,7 +111,7 @@ var CONST = {
* Direction constant. * Direction constant.
* *
* @name Phaser.LEFT * @name Phaser.LEFT
* @readonly * @const
* @type {integer} * @type {integer}
* @since 3.0.0 * @since 3.0.0
*/ */
@ -121,7 +121,7 @@ var CONST = {
* Direction constant. * Direction constant.
* *
* @name Phaser.RIGHT * @name Phaser.RIGHT
* @readonly * @const
* @type {integer} * @type {integer}
* @since 3.0.0 * @since 3.0.0
*/ */

View file

@ -18,7 +18,7 @@ var GetColor = function (value)
* Provides methods used for setting the tint of a Game Object. * Provides methods used for setting the tint of a Game Object.
* Should be applied as a mixin and not used directly. * Should be applied as a mixin and not used directly.
* *
* @name Phaser.GameObjects.Components.Tint * @namespace Phaser.GameObjects.Components.Tint
* @webglOnly * @webglOnly
* @since 3.0.0 * @since 3.0.0
*/ */

View file

@ -307,7 +307,7 @@ var World = new Class({
* - 0.5 = double speed * - 0.5 = double speed
* *
* @name Phaser.Physics.Arcade.World#timeScale * @name Phaser.Physics.Arcade.World#timeScale
* @property {number} * @type {number}
* @default 1 * @default 1
* @since 3.10.0 * @since 3.10.0
*/ */

View file

@ -7,7 +7,7 @@
/** /**
* Provides methods used for setting the acceleration properties of an Arcade Physics Body. * 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 * @since 3.0.0
*/ */
var Acceleration = { var Acceleration = {

View file

@ -7,7 +7,7 @@
/** /**
* Provides methods used for setting the angular acceleration properties of an Arcade Physics Body. * 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 * @since 3.0.0
*/ */
var Angular = { var Angular = {

View file

@ -7,7 +7,7 @@
/** /**
* Provides methods used for setting the bounce properties of an Arcade Physics Body. * 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 * @since 3.0.0
*/ */
var Bounce = { var Bounce = {

View file

@ -7,7 +7,7 @@
/** /**
* Provides methods used for setting the debug properties of an Arcade Physics Body. * 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 * @since 3.0.0
*/ */
var Debug = { var Debug = {

View file

@ -7,7 +7,7 @@
/** /**
* Provides methods used for setting the drag properties of an Arcade Physics Body. * 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 * @since 3.0.0
*/ */
var Drag = { var Drag = {

View file

@ -7,7 +7,7 @@
/** /**
* Provides methods used for setting the enable properties of an Arcade Physics Body. * 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 * @since 3.0.0
*/ */
var Enable = { var Enable = {

View file

@ -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. * 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 * @since 3.0.0
*/ */
var Friction = { var Friction = {

View file

@ -8,7 +8,7 @@
* Provides methods for setting the gravity properties of an Arcade Physics Game Object. * Provides methods for setting the gravity properties of an Arcade Physics Game Object.
* Should be applied as a mixin and not used directly. * 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 * @since 3.0.0
*/ */
var Gravity = { var Gravity = {

View file

@ -7,7 +7,7 @@
/** /**
* Provides methods used for setting the immovable properties of an Arcade Physics Body. * 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 * @since 3.0.0
*/ */
var Immovable = { var Immovable = {

View file

@ -7,7 +7,7 @@
/** /**
* Provides methods used for setting the mass properties of an Arcade Physics Body. * 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 * @since 3.0.0
*/ */
var Mass = { var Mass = {

View file

@ -8,7 +8,7 @@
* Provides methods for setting the size of an Arcade Physics Game Object. * Provides methods for setting the size of an Arcade Physics Game Object.
* Should be applied as a mixin and not used directly. * 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 * @since 3.0.0
*/ */
var Size = { var Size = {

View file

@ -9,7 +9,7 @@
* *
* Should be applied as a mixin and not used directly. * 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 * @since 3.0.0
*/ */
var Velocity = { var Velocity = {

View file

@ -13,18 +13,19 @@
* with other LITE or PASSIVE entities at all. The behavior for FIXED vs. * with other LITE or PASSIVE entities at all. The behavior for FIXED vs.
* FIXED collisions is undefined. * FIXED collisions is undefined.
* *
* @name Phaser.Physics.Impact.COLLIDES * @namespace Phaser.Physics.Impact.COLLIDES
* @enum {integer}
* @memberof Phaser.Physics.Impact * @memberof Phaser.Physics.Impact
* @readonly
* @since 3.0.0 * @since 3.0.0
*/ */
module.exports = { module.exports = {
/** /**
* Never collides. * Never collides.
* *
* @name Phaser.Physics.Impact.COLLIDES.NEVER * @name Phaser.Physics.Impact.COLLIDES.NEVER
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
NEVER: 0, NEVER: 0,
@ -33,6 +34,8 @@ module.exports = {
* Lite collision. * Lite collision.
* *
* @name Phaser.Physics.Impact.COLLIDES.LITE * @name Phaser.Physics.Impact.COLLIDES.LITE
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
LITE: 1, LITE: 1,
@ -41,6 +44,8 @@ module.exports = {
* Passive collision. * Passive collision.
* *
* @name Phaser.Physics.Impact.COLLIDES.PASSIVE * @name Phaser.Physics.Impact.COLLIDES.PASSIVE
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
PASSIVE: 2, PASSIVE: 2,
@ -49,6 +54,8 @@ module.exports = {
* Active collision. * Active collision.
* *
* @name Phaser.Physics.Impact.COLLIDES.ACTIVE * @name Phaser.Physics.Impact.COLLIDES.ACTIVE
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
ACTIVE: 4, ACTIVE: 4,
@ -57,6 +64,8 @@ module.exports = {
* Fixed collision. * Fixed collision.
* *
* @name Phaser.Physics.Impact.COLLIDES.FIXED * @name Phaser.Physics.Impact.COLLIDES.FIXED
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
FIXED: 8 FIXED: 8

View file

@ -13,10 +13,8 @@
* with other LITE or PASSIVE entities at all. The behavior for FIXED vs. * with other LITE or PASSIVE entities at all. The behavior for FIXED vs.
* FIXED collisions is undefined. * FIXED collisions is undefined.
* *
* @name Phaser.Physics.Impact.TYPE * @namespace Phaser.Physics.Impact.TYPE
* @enum {integer}
* @memberof Phaser.Physics.Impact * @memberof Phaser.Physics.Impact
* @readonly
* @since 3.0.0 * @since 3.0.0
*/ */
module.exports = { module.exports = {
@ -25,6 +23,8 @@ module.exports = {
* Collides with nothing. * Collides with nothing.
* *
* @name Phaser.Physics.Impact.TYPE.NONE * @name Phaser.Physics.Impact.TYPE.NONE
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
NONE: 0, NONE: 0,
@ -33,6 +33,8 @@ module.exports = {
* Type A. Collides with Type B. * Type A. Collides with Type B.
* *
* @name Phaser.Physics.Impact.TYPE.A * @name Phaser.Physics.Impact.TYPE.A
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
A: 1, A: 1,
@ -41,6 +43,8 @@ module.exports = {
* Type B. Collides with Type A. * Type B. Collides with Type A.
* *
* @name Phaser.Physics.Impact.TYPE.B * @name Phaser.Physics.Impact.TYPE.B
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
B: 2, B: 2,
@ -49,6 +53,8 @@ module.exports = {
* Collides with both types A and B. * Collides with both types A and B.
* *
* @name Phaser.Physics.Impact.TYPE.BOTH * @name Phaser.Physics.Impact.TYPE.BOTH
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
BOTH: 3 BOTH: 3

View file

@ -8,7 +8,7 @@
* The Impact Acceleration component. * The Impact Acceleration component.
* Should be applied as a mixin. * Should be applied as a mixin.
* *
* @name Phaser.Physics.Impact.Components.Acceleration * @namespace Phaser.Physics.Impact.Components.Acceleration
* @since 3.0.0 * @since 3.0.0
*/ */
var Acceleration = { var Acceleration = {

View file

@ -8,7 +8,7 @@
* The Impact Body Scale component. * The Impact Body Scale component.
* Should be applied as a mixin. * Should be applied as a mixin.
* *
* @name Phaser.Physics.Impact.Components.BodyScale * @namespace Phaser.Physics.Impact.Components.BodyScale
* @since 3.0.0 * @since 3.0.0
*/ */
var BodyScale = { var BodyScale = {

View file

@ -10,7 +10,7 @@ var TYPE = require('../TYPE');
* The Impact Body Type component. * The Impact Body Type component.
* Should be applied as a mixin. * Should be applied as a mixin.
* *
* @name Phaser.Physics.Impact.Components.BodyType * @namespace Phaser.Physics.Impact.Components.BodyType
* @since 3.0.0 * @since 3.0.0
*/ */
var BodyType = { var BodyType = {

View file

@ -8,7 +8,7 @@
* The Impact Bounce component. * The Impact Bounce component.
* Should be applied as a mixin. * Should be applied as a mixin.
* *
* @name Phaser.Physics.Impact.Components.Bounce * @namespace Phaser.Physics.Impact.Components.Bounce
* @since 3.0.0 * @since 3.0.0
*/ */
var Bounce = { var Bounce = {

View file

@ -10,7 +10,7 @@ var TYPE = require('../TYPE');
* The Impact Check Against component. * The Impact Check Against component.
* Should be applied as a mixin. * Should be applied as a mixin.
* *
* @name Phaser.Physics.Impact.Components.CheckAgainst * @namespace Phaser.Physics.Impact.Components.CheckAgainst
* @since 3.0.0 * @since 3.0.0
*/ */
var CheckAgainst = { var CheckAgainst = {

View file

@ -18,7 +18,7 @@ var COLLIDES = require('../COLLIDES');
* The Impact Collides component. * The Impact Collides component.
* Should be applied as a mixin. * Should be applied as a mixin.
* *
* @name Phaser.Physics.Impact.Components.Collides * @namespace Phaser.Physics.Impact.Components.Collides
* @since 3.0.0 * @since 3.0.0
*/ */
var Collides = { var Collides = {

View file

@ -8,7 +8,7 @@
* The Impact Debug component. * The Impact Debug component.
* Should be applied as a mixin. * Should be applied as a mixin.
* *
* @name Phaser.Physics.Impact.Components.Debug * @namespace Phaser.Physics.Impact.Components.Debug
* @since 3.0.0 * @since 3.0.0
*/ */
var Debug = { var Debug = {

View file

@ -8,7 +8,7 @@
* The Impact Friction component. * The Impact Friction component.
* Should be applied as a mixin. * Should be applied as a mixin.
* *
* @name Phaser.Physics.Impact.Components.Friction * @namespace Phaser.Physics.Impact.Components.Friction
* @since 3.0.0 * @since 3.0.0
*/ */
var Friction = { var Friction = {

View file

@ -8,7 +8,7 @@
* The Impact Gravity component. * The Impact Gravity component.
* Should be applied as a mixin. * Should be applied as a mixin.
* *
* @name Phaser.Physics.Impact.Components.Gravity * @namespace Phaser.Physics.Impact.Components.Gravity
* @since 3.0.0 * @since 3.0.0
*/ */
var Gravity = { var Gravity = {

View file

@ -8,7 +8,7 @@
* The Impact Offset component. * The Impact Offset component.
* Should be applied as a mixin. * Should be applied as a mixin.
* *
* @name Phaser.Physics.Impact.Components.Offset * @namespace Phaser.Physics.Impact.Components.Offset
* @since 3.0.0 * @since 3.0.0
*/ */
var Offset = { var Offset = {

View file

@ -8,7 +8,7 @@
* The Impact Set Game Object component. * The Impact Set Game Object component.
* Should be applied as a mixin. * Should be applied as a mixin.
* *
* @name Phaser.Physics.Impact.Components.SetGameObject * @namespace Phaser.Physics.Impact.Components.SetGameObject
* @since 3.0.0 * @since 3.0.0
*/ */
var SetGameObject = { var SetGameObject = {

View file

@ -8,7 +8,7 @@
* The Impact Velocity component. * The Impact Velocity component.
* Should be applied as a mixin. * Should be applied as a mixin.
* *
* @name Phaser.Physics.Impact.Components.Velocity * @namespace Phaser.Physics.Impact.Components.Velocity
* @since 3.0.0 * @since 3.0.0
*/ */
var Velocity = { var Velocity = {

View file

@ -7,7 +7,7 @@
/** /**
* A component to set restitution on objects. * A component to set restitution on objects.
* *
* @name Phaser.Physics.Matter.Components.Bounce * @namespace Phaser.Physics.Matter.Components.Bounce
* @since 3.0.0 * @since 3.0.0
*/ */
var Bounce = { var Bounce = {

View file

@ -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. * 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 * @since 3.0.0
*/ */
var Collision = { var Collision = {

View file

@ -9,7 +9,7 @@ var Body = require('../lib/body/Body');
/** /**
* A component to apply force to Matter.js bodies. * 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 * @since 3.0.0
*/ */
var Force = { var Force = {

View file

@ -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. * 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 * @since 3.0.0
*/ */
var Friction = { var Friction = {

View file

@ -7,7 +7,7 @@
/** /**
* A component to manipulate world gravity for Matter.js bodies. * 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 * @since 3.0.0
*/ */
var Gravity = { var Gravity = {

View file

@ -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. * 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 * @since 3.0.0
*/ */
var Mass = { var Mass = {
@ -53,6 +53,7 @@ var Mass = {
* The body's center of mass. * The body's center of mass.
* *
* @name Phaser.Physics.Matter.Components.Mass#centerOfMass * @name Phaser.Physics.Matter.Components.Mass#centerOfMass
* @type {Phaser.Math.Vector2}
* @readonly * @readonly
* @since 3.10.0 * @since 3.10.0
* *

View file

@ -7,7 +7,7 @@
/** /**
* [description] * [description]
* *
* @name Phaser.Physics.Matter.Components.Sensor * @namespace Phaser.Physics.Matter.Components.Sensor
* @since 3.0.0 * @since 3.0.0
*/ */
var Sensor = { var Sensor = {

View file

@ -13,7 +13,7 @@ var Vertices = require('../lib/geometry/Vertices');
/** /**
* [description] * [description]
* *
* @name Phaser.Physics.Matter.Components.SetBody * @namespace Phaser.Physics.Matter.Components.SetBody
* @since 3.0.0 * @since 3.0.0
*/ */
var SetBody = { var SetBody = {

View file

@ -10,7 +10,7 @@ var MatterEvents = require('../lib/core/Events');
/** /**
* [description] * [description]
* *
* @name Phaser.Physics.Matter.Components.Sleep * @namespace Phaser.Physics.Matter.Components.Sleep
* @since 3.0.0 * @since 3.0.0
*/ */
var Sleep = { var Sleep = {

View file

@ -9,7 +9,7 @@ var Body = require('../lib/body/Body');
/** /**
* [description] * [description]
* *
* @name Phaser.Physics.Matter.Components.Static * @namespace Phaser.Physics.Matter.Components.Static
* @since 3.0.0 * @since 3.0.0
*/ */
var Static = { var Static = {

View file

@ -17,7 +17,7 @@ var _FLAG = 4; // 0100
/** /**
* Provides methods used for getting and setting the position, scale and rotation of a Game Object. * 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 * @since 3.0.0
*/ */
var Transform = { var Transform = {

View file

@ -9,7 +9,7 @@ var Body = require('../lib/body/Body');
/** /**
* [description] * [description]
* *
* @name Phaser.Physics.Matter.Components.Velocity * @namespace Phaser.Physics.Matter.Components.Velocity
* @since 3.0.0 * @since 3.0.0
*/ */
var Velocity = { var Velocity = {

View file

@ -7,10 +7,8 @@
/** /**
* Phaser Blend Modes. * Phaser Blend Modes.
* *
* @name Phaser.BlendModes * @namespace Phaser.BlendModes
* @enum {integer}
* @memberof Phaser * @memberof Phaser
* @readonly
* @since 3.0.0 * @since 3.0.0
*/ */
@ -20,6 +18,8 @@ module.exports = {
* Skips the Blend Mode check in the renderer. * Skips the Blend Mode check in the renderer.
* *
* @name Phaser.BlendModes.SKIP_CHECK * @name Phaser.BlendModes.SKIP_CHECK
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
SKIP_CHECK: -1, 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. * This is the default setting and draws new shapes on top of the existing canvas content.
* *
* @name Phaser.BlendModes.NORMAL * @name Phaser.BlendModes.NORMAL
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
NORMAL: 0, NORMAL: 0,
@ -38,6 +40,8 @@ module.exports = {
* Where both shapes overlap the color is determined by adding color values. * Where both shapes overlap the color is determined by adding color values.
* *
* @name Phaser.BlendModes.ADD * @name Phaser.BlendModes.ADD
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
ADD: 1, 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. * 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 * @name Phaser.BlendModes.MULTIPLY
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
MULTIPLY: 2, 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) * The pixels are inverted, multiplied, and inverted again. A lighter picture is the result (opposite of multiply)
* *
* @name Phaser.BlendModes.SCREEN * @name Phaser.BlendModes.SCREEN
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
SCREEN: 3, 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. * A combination of multiply and screen. Dark parts on the base layer become darker, and light parts become lighter.
* *
* @name Phaser.BlendModes.OVERLAY * @name Phaser.BlendModes.OVERLAY
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
OVERLAY: 4, OVERLAY: 4,
@ -74,6 +84,8 @@ module.exports = {
* Retains the darkest pixels of both layers. * Retains the darkest pixels of both layers.
* *
* @name Phaser.BlendModes.DARKEN * @name Phaser.BlendModes.DARKEN
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
DARKEN: 5, DARKEN: 5,
@ -83,6 +95,8 @@ module.exports = {
* Retains the lightest pixels of both layers. * Retains the lightest pixels of both layers.
* *
* @name Phaser.BlendModes.LIGHTEN * @name Phaser.BlendModes.LIGHTEN
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
LIGHTEN: 6, LIGHTEN: 6,
@ -92,6 +106,8 @@ module.exports = {
* Divides the bottom layer by the inverted top layer. * Divides the bottom layer by the inverted top layer.
* *
* @name Phaser.BlendModes.COLOR_DODGE * @name Phaser.BlendModes.COLOR_DODGE
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
COLOR_DODGE: 7, COLOR_DODGE: 7,
@ -101,6 +117,8 @@ module.exports = {
* Divides the inverted bottom layer by the top layer, and then inverts the result. * Divides the inverted bottom layer by the top layer, and then inverts the result.
* *
* @name Phaser.BlendModes.COLOR_BURN * @name Phaser.BlendModes.COLOR_BURN
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
COLOR_BURN: 8, COLOR_BURN: 8,
@ -110,6 +128,8 @@ module.exports = {
* A combination of multiply and screen like overlay, but with top and bottom layer swapped. * A combination of multiply and screen like overlay, but with top and bottom layer swapped.
* *
* @name Phaser.BlendModes.HARD_LIGHT * @name Phaser.BlendModes.HARD_LIGHT
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
HARD_LIGHT: 9, 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. * A softer version of hard-light. Pure black or white does not result in pure black or white.
* *
* @name Phaser.BlendModes.SOFT_LIGHT * @name Phaser.BlendModes.SOFT_LIGHT
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
SOFT_LIGHT: 10, 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. * Subtracts the bottom layer from the top layer or the other way round to always get a positive value.
* *
* @name Phaser.BlendModes.DIFFERENCE * @name Phaser.BlendModes.DIFFERENCE
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
DIFFERENCE: 11, DIFFERENCE: 11,
@ -137,6 +161,8 @@ module.exports = {
* Like difference, but with lower contrast. * Like difference, but with lower contrast.
* *
* @name Phaser.BlendModes.EXCLUSION * @name Phaser.BlendModes.EXCLUSION
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
EXCLUSION: 12, 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. * Preserves the luma and chroma of the bottom layer, while adopting the hue of the top layer.
* *
* @name Phaser.BlendModes.HUE * @name Phaser.BlendModes.HUE
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
HUE: 13, 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. * Preserves the luma and hue of the bottom layer, while adopting the chroma of the top layer.
* *
* @name Phaser.BlendModes.SATURATION * @name Phaser.BlendModes.SATURATION
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
SATURATION: 14, 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. * Preserves the luma of the bottom layer, while adopting the hue and chroma of the top layer.
* *
* @name Phaser.BlendModes.COLOR * @name Phaser.BlendModes.COLOR
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
COLOR: 15, 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. * Preserves the hue and chroma of the bottom layer, while adopting the luma of the top layer.
* *
* @name Phaser.BlendModes.LUMINOSITY * @name Phaser.BlendModes.LUMINOSITY
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
LUMINOSITY: 16, LUMINOSITY: 16,
@ -181,6 +215,8 @@ module.exports = {
* Alpha erase blend mode. For Canvas and WebGL. * Alpha erase blend mode. For Canvas and WebGL.
* *
* @name Phaser.BlendModes.ERASE * @name Phaser.BlendModes.ERASE
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
ERASE: 17, 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. * 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 * @name Phaser.BlendModes.SOURCE_IN
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
SOURCE_IN: 18, SOURCE_IN: 18,
@ -199,6 +237,8 @@ module.exports = {
* The new shape is drawn where it doesn't overlap the existing canvas content. * The new shape is drawn where it doesn't overlap the existing canvas content.
* *
* @name Phaser.BlendModes.SOURCE_OUT * @name Phaser.BlendModes.SOURCE_OUT
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
SOURCE_OUT: 19, SOURCE_OUT: 19,
@ -208,6 +248,8 @@ module.exports = {
* The new shape is only drawn where it overlaps the existing canvas content. * The new shape is only drawn where it overlaps the existing canvas content.
* *
* @name Phaser.BlendModes.SOURCE_ATOP * @name Phaser.BlendModes.SOURCE_ATOP
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
SOURCE_ATOP: 20, SOURCE_ATOP: 20,
@ -217,6 +259,8 @@ module.exports = {
* New shapes are drawn behind the existing canvas content. * New shapes are drawn behind the existing canvas content.
* *
* @name Phaser.BlendModes.DESTINATION_OVER * @name Phaser.BlendModes.DESTINATION_OVER
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
DESTINATION_OVER: 21, 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. * 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 * @name Phaser.BlendModes.DESTINATION_IN
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
DESTINATION_IN: 22, DESTINATION_IN: 22,
@ -235,6 +281,8 @@ module.exports = {
* The existing content is kept where it doesn't overlap the new shape. * The existing content is kept where it doesn't overlap the new shape.
* *
* @name Phaser.BlendModes.DESTINATION_OUT * @name Phaser.BlendModes.DESTINATION_OUT
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
DESTINATION_OUT: 23, 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. * 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 * @name Phaser.BlendModes.DESTINATION_ATOP
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
DESTINATION_ATOP: 24, DESTINATION_ATOP: 24,
@ -253,6 +303,8 @@ module.exports = {
* Where both shapes overlap the color is determined by adding color values. * Where both shapes overlap the color is determined by adding color values.
* *
* @name Phaser.BlendModes.LIGHTER * @name Phaser.BlendModes.LIGHTER
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
LIGHTER: 25, LIGHTER: 25,
@ -262,15 +314,19 @@ module.exports = {
* Only the new shape is shown. * Only the new shape is shown.
* *
* @name Phaser.BlendModes.COPY * @name Phaser.BlendModes.COPY
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
COPY: 26, 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. * Shapes are made transparent where both overlap and drawn normal everywhere else.
* *
* @name Phaser.BlendModes.XOR * @name Phaser.BlendModes.XOR
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
XOR: 27 XOR: 27

View file

@ -7,10 +7,8 @@
/** /**
* Phaser Scale Modes. * Phaser Scale Modes.
* *
* @name Phaser.ScaleModes * @namespace Phaser.ScaleModes
* @enum {integer}
* @memberof Phaser * @memberof Phaser
* @readonly
* @since 3.0.0 * @since 3.0.0
*/ */
@ -20,6 +18,8 @@ module.exports = {
* Default Scale Mode (Linear). * Default Scale Mode (Linear).
* *
* @name Phaser.ScaleModes.DEFAULT * @name Phaser.ScaleModes.DEFAULT
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
DEFAULT: 0, DEFAULT: 0,
@ -28,6 +28,8 @@ module.exports = {
* Linear Scale Mode. * Linear Scale Mode.
* *
* @name Phaser.ScaleModes.LINEAR * @name Phaser.ScaleModes.LINEAR
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
LINEAR: 0, LINEAR: 0,
@ -36,6 +38,8 @@ module.exports = {
* Nearest Scale Mode. * Nearest Scale Mode.
* *
* @name Phaser.ScaleModes.NEAREST * @name Phaser.ScaleModes.NEAREST
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
NEAREST: 1 NEAREST: 1

View file

@ -8,7 +8,7 @@
* Implements a model view projection matrices. * Implements a model view projection matrices.
* Pipelines can implement this for doing 2D and 3D rendering. * 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 * @since 3.0.0
*/ */
var ModelViewProjection = { var ModelViewProjection = {

View file

@ -29,6 +29,8 @@ module.exports = {
* You can still center it yourself via CSS. * You can still center it yourself via CSS.
* *
* @name Phaser.Scale.Center.NO_CENTER * @name Phaser.Scale.Center.NO_CENTER
* @type {integer}
* @const
* @since 3.16.0 * @since 3.16.0
*/ */
NO_CENTER: 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. * game canvas, and does not factor in any other CSS styles you may have applied.
* *
* @name Phaser.Scale.Center.CENTER_BOTH * @name Phaser.Scale.Center.CENTER_BOTH
* @type {integer}
* @const
* @since 3.16.0 * @since 3.16.0
*/ */
CENTER_BOTH: 1, CENTER_BOTH: 1,
@ -53,6 +57,8 @@ module.exports = {
* game canvas, and does not factor in any other CSS styles you may have applied. * game canvas, and does not factor in any other CSS styles you may have applied.
* *
* @name Phaser.Scale.Center.CENTER_HORIZONTALLY * @name Phaser.Scale.Center.CENTER_HORIZONTALLY
* @type {integer}
* @const
* @since 3.16.0 * @since 3.16.0
*/ */
CENTER_HORIZONTALLY: 2, CENTER_HORIZONTALLY: 2,
@ -65,6 +71,8 @@ module.exports = {
* game canvas, and does not factor in any other CSS styles you may have applied. * game canvas, and does not factor in any other CSS styles you may have applied.
* *
* @name Phaser.Scale.Center.CENTER_VERTICALLY * @name Phaser.Scale.Center.CENTER_VERTICALLY
* @type {integer}
* @const
* @since 3.16.0 * @since 3.16.0
*/ */
CENTER_VERTICALLY: 3 CENTER_VERTICALLY: 3

View file

@ -28,6 +28,8 @@ module.exports = {
* A landscape orientation. * A landscape orientation.
* *
* @name Phaser.Scale.Orientation.LANDSCAPE * @name Phaser.Scale.Orientation.LANDSCAPE
* @type {string}
* @const
* @since 3.16.0 * @since 3.16.0
*/ */
LANDSCAPE: 'landscape-primary', LANDSCAPE: 'landscape-primary',
@ -36,6 +38,8 @@ module.exports = {
* A portrait orientation. * A portrait orientation.
* *
* @name Phaser.Scale.Orientation.PORTRAIT * @name Phaser.Scale.Orientation.PORTRAIT
* @type {string}
* @const
* @since 3.16.0 * @since 3.16.0
*/ */
PORTRAIT: 'portrait-primary' PORTRAIT: 'portrait-primary'

View file

@ -30,6 +30,8 @@ module.exports = {
* to call the Scale Managers `resize` method to give the new dimensions, or input events will stop working. * to call the Scale Managers `resize` method to give the new dimensions, or input events will stop working.
* *
* @name Phaser.Scale.ScaleModes.NONE * @name Phaser.Scale.ScaleModes.NONE
* @type {integer}
* @const
* @since 3.16.0 * @since 3.16.0
*/ */
NONE: 0, NONE: 0,
@ -38,6 +40,8 @@ module.exports = {
* The height is automatically adjusted based on the width. * The height is automatically adjusted based on the width.
* *
* @name Phaser.Scale.ScaleModes.WIDTH_CONTROLS_HEIGHT * @name Phaser.Scale.ScaleModes.WIDTH_CONTROLS_HEIGHT
* @type {integer}
* @const
* @since 3.16.0 * @since 3.16.0
*/ */
WIDTH_CONTROLS_HEIGHT: 1, WIDTH_CONTROLS_HEIGHT: 1,
@ -46,6 +50,8 @@ module.exports = {
* The width is automatically adjusted based on the height. * The width is automatically adjusted based on the height.
* *
* @name Phaser.Scale.ScaleModes.HEIGHT_CONTROLS_WIDTH * @name Phaser.Scale.ScaleModes.HEIGHT_CONTROLS_WIDTH
* @type {integer}
* @const
* @since 3.16.0 * @since 3.16.0
*/ */
HEIGHT_CONTROLS_WIDTH: 2, HEIGHT_CONTROLS_WIDTH: 2,
@ -56,6 +62,8 @@ module.exports = {
* inside the area which is not covered. * inside the area which is not covered.
* *
* @name Phaser.Scale.ScaleModes.FIT * @name Phaser.Scale.ScaleModes.FIT
* @type {integer}
* @const
* @since 3.16.0 * @since 3.16.0
*/ */
FIT: 3, FIT: 3,
@ -65,6 +73,8 @@ module.exports = {
* area while keeping the aspect ratio. This may extend further out than the target size. * area while keeping the aspect ratio. This may extend further out than the target size.
* *
* @name Phaser.Scale.ScaleModes.ENVELOP * @name Phaser.Scale.ScaleModes.ENVELOP
* @type {integer}
* @const
* @since 3.16.0 * @since 3.16.0
*/ */
ENVELOP: 4, ENVELOP: 4,
@ -73,6 +83,8 @@ module.exports = {
* The Canvas is resized to fit all available _parent_ space, regardless of aspect ratio. * The Canvas is resized to fit all available _parent_ space, regardless of aspect ratio.
* *
* @name Phaser.Scale.ScaleModes.RESIZE * @name Phaser.Scale.ScaleModes.RESIZE
* @type {integer}
* @const
* @since 3.16.0 * @since 3.16.0
*/ */
RESIZE: 5 RESIZE: 5

View file

@ -28,6 +28,8 @@ module.exports = {
* The game canvas will not be zoomed by Phaser. * The game canvas will not be zoomed by Phaser.
* *
* @name Phaser.Scale.Zoom.NO_ZOOM * @name Phaser.Scale.Zoom.NO_ZOOM
* @type {integer}
* @const
* @since 3.16.0 * @since 3.16.0
*/ */
NO_ZOOM: 1, NO_ZOOM: 1,
@ -36,6 +38,8 @@ module.exports = {
* The game canvas will be 2x zoomed by Phaser. * The game canvas will be 2x zoomed by Phaser.
* *
* @name Phaser.Scale.Zoom.ZOOM_2X * @name Phaser.Scale.Zoom.ZOOM_2X
* @type {integer}
* @const
* @since 3.16.0 * @since 3.16.0
*/ */
ZOOM_2X: 2, ZOOM_2X: 2,
@ -44,6 +48,8 @@ module.exports = {
* The game canvas will be 4x zoomed by Phaser. * The game canvas will be 4x zoomed by Phaser.
* *
* @name Phaser.Scale.Zoom.ZOOM_4X * @name Phaser.Scale.Zoom.ZOOM_4X
* @type {integer}
* @const
* @since 3.16.0 * @since 3.16.0
*/ */
ZOOM_4X: 4, ZOOM_4X: 4,
@ -53,6 +59,8 @@ module.exports = {
* fit into the parent, or browser window if no parent is set. * fit into the parent, or browser window if no parent is set.
* *
* @name Phaser.Scale.Zoom.MAX_ZOOM * @name Phaser.Scale.Zoom.MAX_ZOOM
* @type {integer}
* @const
* @since 3.16.0 * @since 3.16.0
*/ */
MAX_ZOOM: -1 MAX_ZOOM: -1

View file

@ -7,10 +7,8 @@
/** /**
* Filter Types. * Filter Types.
* *
* @name Phaser.Textures.FilterMode * @namespace Phaser.Textures.FilterMode
* @enum {integer}
* @memberof Phaser.Textures * @memberof Phaser.Textures
* @readonly
* @since 3.0.0 * @since 3.0.0
*/ */
var CONST = { var CONST = {
@ -19,6 +17,8 @@ var CONST = {
* Linear filter type. * Linear filter type.
* *
* @name Phaser.Textures.FilterMode.LINEAR * @name Phaser.Textures.FilterMode.LINEAR
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
LINEAR: 0, LINEAR: 0,
@ -27,6 +27,8 @@ var CONST = {
* Nearest neighbor filter type. * Nearest neighbor filter type.
* *
* @name Phaser.Textures.FilterMode.NEAREST * @name Phaser.Textures.FilterMode.NEAREST
* @type {integer}
* @const
* @since 3.0.0 * @since 3.0.0
*/ */
NEAREST: 1 NEAREST: 1