Lots of namespace and jsdoc fixes

This commit is contained in:
Richard Davey 2019-02-01 18:02:58 +00:00
parent ec7e062dd1
commit eb9ed3463f
14 changed files with 121 additions and 111 deletions

View file

@ -213,6 +213,8 @@ one set of bindings ever created, which makes things a lot cleaner.
* The `ended` event in `WebAudioSound` has been renamed to `complete` to make it more consistent with the rest of the API.
* The `ended` event in `HTML5AudioSound` has been renamed to `complete` to make it more consistent with the rest of the API.
* The `Phaser.Utils.Objects` namespace was incorrectly exposed in the Phaser entrypoints as `Object` (note the lack of plural), this has now been fixed so all associated functions are properly namespaced.
* `Phaser.GameObjects.Blitter.Bob` has been renamed to `Phaser.GameObjects.Bob` to avoid namespace conflicts in TypeScript.
* `Phaser.GameObjects.Text.TextStyle` has been renamed to `Phaser.GameObjects.TextStyle` to avoid namespace conflicts in TypeScript.
### New Features

View file

@ -10,6 +10,10 @@ var GetColor32 = require('./GetColor32');
var HSVToRGB = require('./HSVToRGB');
var RGBToHSV = require('./RGBToHSV');
/**
* @namespace Phaser.Display.Color
*/
/**
* @classdesc
* The Color class holds a single color value and allows for easy modification and reading of it.

View file

@ -15,14 +15,10 @@ var List = require('../../structs/List');
/**
* @callback CreateCallback
*
* @param {Phaser.GameObjects.Blitter.Bob} bob - The Bob that was created by the Blitter.
* @param {Phaser.GameObjects.Bob} bob - The Bob that was created by the Blitter.
* @param {integer} index - The position of the Bob within the Blitter display list.
*/
/**
* @namespace [Phaser.GameObjects.Blitter] Phaser.GameObjects.Blitter
*/
/**
* @classdesc
* A Blitter Game Object.
@ -97,7 +93,7 @@ var Blitter = new Class({
* This List contains all of the Bob objects created by the Blitter.
*
* @name Phaser.GameObjects.Blitter#children
* @type {Phaser.Structs.List.<Phaser.GameObjects.Blitter.Bob>}
* @type {Phaser.Structs.List.<Phaser.GameObjects.Bob>}
* @since 3.0.0
*/
this.children = new List();
@ -107,7 +103,7 @@ var Blitter = new Class({
* The array is re-populated whenever the dirty flag is set.
*
* @name Phaser.GameObjects.Blitter#renderList
* @type {Phaser.GameObjects.Blitter.Bob[]}
* @type {Phaser.GameObjects.Bob[]}
* @default []
* @private
* @since 3.0.0
@ -140,7 +136,7 @@ var Blitter = new Class({
* @param {boolean} [visible=true] - Should the created Bob render or not?
* @param {integer} [index] - The position in the Blitters Display List to add the new Bob at. Defaults to the top of the list.
*
* @return {Phaser.GameObjects.Blitter.Bob} The newly created Bob object.
* @return {Phaser.GameObjects.Bob} The newly created Bob object.
*/
create: function (x, y, frame, visible, index)
{
@ -176,7 +172,7 @@ var Blitter = new Class({
* @param {(string|integer|Phaser.Textures.Frame|string[]|integer[]|Phaser.Textures.Frame[])} [frame] - The Frame the Bobs will use. It must be part of the Blitter Texture.
* @param {boolean} [visible=true] - Should the created Bob render or not?
*
* @return {Phaser.GameObjects.Blitter.Bob[]} An array of Bob objects that were created.
* @return {Phaser.GameObjects.Bob[]} An array of Bob objects that were created.
*/
createFromCallback: function (callback, quantity, frame, visible)
{
@ -207,7 +203,7 @@ var Blitter = new Class({
* @param {(string|integer|Phaser.Textures.Frame|string[]|integer[]|Phaser.Textures.Frame[])} [frame] - The Frame the Bobs will use. It must be part of the Blitter Texture.
* @param {boolean} [visible=true] - Should the created Bob render or not?
*
* @return {Phaser.GameObjects.Blitter.Bob[]} An array of Bob objects that were created.
* @return {Phaser.GameObjects.Bob[]} An array of Bob objects that were created.
*/
createMultiple: function (quantity, frame, visible)
{
@ -239,7 +235,7 @@ var Blitter = new Class({
* @method Phaser.GameObjects.Blitter#childCanRender
* @since 3.0.0
*
* @param {Phaser.GameObjects.Blitter.Bob} child - The Bob to check for rendering.
* @param {Phaser.GameObjects.Bob} child - The Bob to check for rendering.
*
* @return {boolean} Returns `true` if the given child can render, otherwise `false`.
*/
@ -255,7 +251,7 @@ var Blitter = new Class({
* @method Phaser.GameObjects.Blitter#getRenderList
* @since 3.0.0
*
* @return {Phaser.GameObjects.Blitter.Bob[]} An array of Bob objects that will be rendered this frame.
* @return {Phaser.GameObjects.Bob[]} An array of Bob objects that will be rendered this frame.
*/
getRenderList: function ()
{

View file

@ -23,7 +23,7 @@ var Class = require('../../utils/Class');
* handled via the Blitter parent.
*
* @class Bob
* @memberof Phaser.GameObjects.Blitter
* @memberof Phaser.GameObjects
* @constructor
* @since 3.0.0
*
@ -42,7 +42,7 @@ var Bob = new Class({
/**
* The Blitter object that this Bob belongs to.
*
* @name Phaser.GameObjects.Blitter.Bob#parent
* @name Phaser.GameObjects.Bob#parent
* @type {Phaser.GameObjects.Blitter}
* @since 3.0.0
*/
@ -51,7 +51,7 @@ var Bob = new Class({
/**
* The x position of this Bob, relative to the x position of the Blitter.
*
* @name Phaser.GameObjects.Blitter.Bob#x
* @name Phaser.GameObjects.Bob#x
* @type {number}
* @since 3.0.0
*/
@ -60,7 +60,7 @@ var Bob = new Class({
/**
* The y position of this Bob, relative to the y position of the Blitter.
*
* @name Phaser.GameObjects.Blitter.Bob#y
* @name Phaser.GameObjects.Bob#y
* @type {number}
* @since 3.0.0
*/
@ -70,7 +70,7 @@ var Bob = new Class({
* The frame that the Bob uses to render with.
* To change the frame use the `Bob.setFrame` method.
*
* @name Phaser.GameObjects.Blitter.Bob#frame
* @name Phaser.GameObjects.Bob#frame
* @type {Phaser.Textures.Frame}
* @protected
* @since 3.0.0
@ -80,7 +80,7 @@ var Bob = new Class({
/**
* A blank object which can be used to store data related to this Bob in.
*
* @name Phaser.GameObjects.Blitter.Bob#data
* @name Phaser.GameObjects.Bob#data
* @type {object}
* @default {}
* @since 3.0.0
@ -90,7 +90,7 @@ var Bob = new Class({
/**
* The visible state of this Bob.
*
* @name Phaser.GameObjects.Blitter.Bob#_visible
* @name Phaser.GameObjects.Bob#_visible
* @type {boolean}
* @private
* @since 3.0.0
@ -100,7 +100,7 @@ var Bob = new Class({
/**
* The alpha value of this Bob.
*
* @name Phaser.GameObjects.Blitter.Bob#_alpha
* @name Phaser.GameObjects.Bob#_alpha
* @type {number}
* @private
* @default 1
@ -113,7 +113,7 @@ var Bob = new Class({
* A Bob that is flipped horizontally will render inversed on the horizontal axis.
* Flipping always takes place from the middle of the texture.
*
* @name Phaser.GameObjects.Blitter.Bob#flipX
* @name Phaser.GameObjects.Bob#flipX
* @type {boolean}
* @since 3.0.0
*/
@ -124,7 +124,7 @@ var Bob = new Class({
* A Bob that is flipped vertically will render inversed on the vertical axis (i.e. upside down)
* Flipping always takes place from the middle of the texture.
*
* @name Phaser.GameObjects.Blitter.Bob#flipY
* @name Phaser.GameObjects.Bob#flipY
* @type {boolean}
* @since 3.0.0
*/
@ -136,12 +136,12 @@ var Bob = new Class({
* The frame must be part of the Texture the parent Blitter is using.
* If no value is given it will use the default frame of the Blitter parent.
*
* @method Phaser.GameObjects.Blitter.Bob#setFrame
* @method Phaser.GameObjects.Bob#setFrame
* @since 3.0.0
*
* @param {(string|integer|Phaser.Textures.Frame)} [frame] - The frame to be used during rendering.
*
* @return {Phaser.GameObjects.Blitter.Bob} This Bob Game Object.
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
*/
setFrame: function (frame)
{
@ -160,10 +160,10 @@ var Bob = new Class({
/**
* Resets the horizontal and vertical flipped state of this Bob back to their default un-flipped state.
*
* @method Phaser.GameObjects.Blitter.Bob#resetFlip
* @method Phaser.GameObjects.Bob#resetFlip
* @since 3.0.0
*
* @return {Phaser.GameObjects.Blitter.Bob} This Bob Game Object.
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
*/
resetFlip: function ()
{
@ -180,14 +180,14 @@ var Bob = new Class({
*
* Also resets the flipX and flipY values, sets alpha back to 1 and visible to true.
*
* @method Phaser.GameObjects.Blitter.Bob#reset
* @method Phaser.GameObjects.Bob#reset
* @since 3.0.0
*
* @param {number} x - The x position of the Bob. Bob coordinate are relative to the position of the Blitter object.
* @param {number} y - The y position of the Bob. Bob coordinate are relative to the position of the Blitter object.
* @param {(string|integer|Phaser.Textures.Frame)} [frame] - The Frame the Bob will use. It _must_ be part of the Texture the parent Blitter object is using.
*
* @return {Phaser.GameObjects.Blitter.Bob} This Bob Game Object.
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
*/
reset: function (x, y, frame)
{
@ -213,12 +213,12 @@ var Bob = new Class({
/**
* Sets the horizontal flipped state of this Bob.
*
* @method Phaser.GameObjects.Blitter.Bob#setFlipX
* @method Phaser.GameObjects.Bob#setFlipX
* @since 3.0.0
*
* @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.
*
* @return {Phaser.GameObjects.Blitter.Bob} This Bob Game Object.
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
*/
setFlipX: function (value)
{
@ -230,12 +230,12 @@ var Bob = new Class({
/**
* Sets the vertical flipped state of this Bob.
*
* @method Phaser.GameObjects.Blitter.Bob#setFlipY
* @method Phaser.GameObjects.Bob#setFlipY
* @since 3.0.0
*
* @param {boolean} value - The flipped state. `false` for no flip, or `true` to be flipped.
*
* @return {Phaser.GameObjects.Blitter.Bob} This Bob Game Object.
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
*/
setFlipY: function (value)
{
@ -247,13 +247,13 @@ var Bob = new Class({
/**
* Sets the horizontal and vertical flipped state of this Bob.
*
* @method Phaser.GameObjects.Blitter.Bob#setFlip
* @method Phaser.GameObjects.Bob#setFlip
* @since 3.0.0
*
* @param {boolean} x - The horizontal flipped state. `false` for no flip, or `true` to be flipped.
* @param {boolean} y - The horizontal flipped state. `false` for no flip, or `true` to be flipped.
*
* @return {Phaser.GameObjects.Blitter.Bob} This Bob Game Object.
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
*/
setFlip: function (x, y)
{
@ -268,12 +268,12 @@ var Bob = new Class({
*
* An invisible Bob will skip rendering.
*
* @method Phaser.GameObjects.Blitter.Bob#setVisible
* @method Phaser.GameObjects.Bob#setVisible
* @since 3.0.0
*
* @param {boolean} value - The visible state of the Game Object.
*
* @return {Phaser.GameObjects.Blitter.Bob} This Bob Game Object.
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
*/
setVisible: function (value)
{
@ -288,12 +288,12 @@ var Bob = new Class({
*
* A Bob with alpha 0 will skip rendering.
*
* @method Phaser.GameObjects.Blitter.Bob#setAlpha
* @method Phaser.GameObjects.Bob#setAlpha
* @since 3.0.0
*
* @param {number} value - The alpha value used for this Bob. Between 0 and 1.
*
* @return {Phaser.GameObjects.Blitter.Bob} This Bob Game Object.
* @return {Phaser.GameObjects.Bob} This Bob Game Object.
*/
setAlpha: function (value)
{
@ -306,7 +306,7 @@ var Bob = new Class({
* Destroys this Bob instance.
* Removes itself from the Blitter and clears the parent, frame and data properties.
*
* @method Phaser.GameObjects.Blitter.Bob#destroy
* @method Phaser.GameObjects.Bob#destroy
* @since 3.0.0
*/
destroy: function ()
@ -325,7 +325,7 @@ var Bob = new Class({
*
* An invisible Bob will skip rendering.
*
* @name Phaser.GameObjects.Blitter.Bob#visible
* @name Phaser.GameObjects.Bob#visible
* @type {boolean}
* @since 3.0.0
*/
@ -349,7 +349,7 @@ var Bob = new Class({
*
* A Bob with alpha 0 will skip rendering.
*
* @name Phaser.GameObjects.Blitter.Bob#alpha
* @name Phaser.GameObjects.Bob#alpha
* @type {number}
* @since 3.0.0
*/

View file

@ -12,7 +12,7 @@ var CanvasPool = require('../../display/canvas/CanvasPool');
* @function Phaser.GameObjects.Text.MeasureText
* @since 3.0.0
*
* @param {Phaser.GameObjects.Text.TextStyle} textStyle - The TextStyle object to measure.
* @param {Phaser.GameObjects.TextStyle} textStyle - The TextStyle object to measure.
*
* @return {object} An object containing the ascent, descent and fontSize of the TextStyle.
*/

View file

@ -63,10 +63,14 @@ var propertyMap = {
/**
* @classdesc
* Style settings for a Text object.
* A TextStyle class manages all of the style settings for a Text object.
*
* Text Game Objects create a TextStyle instance automatically, which is
* accessed via the `Text.style` property. You do not normally need to
* instantiate one yourself.
*
* @class TextStyle
* @memberof Phaser.GameObjects.Text
* @memberof Phaser.GameObjects
* @constructor
* @since 3.0.0
*
@ -82,7 +86,7 @@ var TextStyle = new Class({
/**
* The Text object that this TextStyle is styling.
*
* @name Phaser.GameObjects.Text.TextStyle#parent
* @name Phaser.GameObjects.TextStyle#parent
* @type {Phaser.GameObjects.Text}
* @since 3.0.0
*/
@ -91,7 +95,7 @@ var TextStyle = new Class({
/**
* The font family.
*
* @name Phaser.GameObjects.Text.TextStyle#fontFamily
* @name Phaser.GameObjects.TextStyle#fontFamily
* @type {string}
* @default 'Courier'
* @since 3.0.0
@ -101,7 +105,7 @@ var TextStyle = new Class({
/**
* The font size.
*
* @name Phaser.GameObjects.Text.TextStyle#fontSize
* @name Phaser.GameObjects.TextStyle#fontSize
* @type {string}
* @default '16px'
* @since 3.0.0
@ -111,7 +115,7 @@ var TextStyle = new Class({
/**
* The font style.
*
* @name Phaser.GameObjects.Text.TextStyle#fontStyle
* @name Phaser.GameObjects.TextStyle#fontStyle
* @type {string}
* @since 3.0.0
*/
@ -120,7 +124,7 @@ var TextStyle = new Class({
/**
* The background color.
*
* @name Phaser.GameObjects.Text.TextStyle#backgroundColor
* @name Phaser.GameObjects.TextStyle#backgroundColor
* @type {string}
* @since 3.0.0
*/
@ -129,7 +133,7 @@ var TextStyle = new Class({
/**
* The text fill color.
*
* @name Phaser.GameObjects.Text.TextStyle#color
* @name Phaser.GameObjects.TextStyle#color
* @type {string}
* @default '#fff'
* @since 3.0.0
@ -139,7 +143,7 @@ var TextStyle = new Class({
/**
* The text stroke color.
*
* @name Phaser.GameObjects.Text.TextStyle#stroke
* @name Phaser.GameObjects.TextStyle#stroke
* @type {string}
* @default '#fff'
* @since 3.0.0
@ -149,7 +153,7 @@ var TextStyle = new Class({
/**
* The text stroke thickness.
*
* @name Phaser.GameObjects.Text.TextStyle#strokeThickness
* @name Phaser.GameObjects.TextStyle#strokeThickness
* @type {number}
* @default 0
* @since 3.0.0
@ -159,7 +163,7 @@ var TextStyle = new Class({
/**
* The horizontal shadow offset.
*
* @name Phaser.GameObjects.Text.TextStyle#shadowOffsetX
* @name Phaser.GameObjects.TextStyle#shadowOffsetX
* @type {number}
* @default 0
* @since 3.0.0
@ -169,7 +173,7 @@ var TextStyle = new Class({
/**
* The vertical shadow offset.
*
* @name Phaser.GameObjects.Text.TextStyle#shadowOffsetY
* @name Phaser.GameObjects.TextStyle#shadowOffsetY
* @type {number}
* @default 0
* @since 3.0.0
@ -179,7 +183,7 @@ var TextStyle = new Class({
/**
* The shadow color.
*
* @name Phaser.GameObjects.Text.TextStyle#shadowColor
* @name Phaser.GameObjects.TextStyle#shadowColor
* @type {string}
* @default '#000'
* @since 3.0.0
@ -189,7 +193,7 @@ var TextStyle = new Class({
/**
* The shadow blur radius.
*
* @name Phaser.GameObjects.Text.TextStyle#shadowBlur
* @name Phaser.GameObjects.TextStyle#shadowBlur
* @type {number}
* @default 0
* @since 3.0.0
@ -199,7 +203,7 @@ var TextStyle = new Class({
/**
* Whether shadow stroke is enabled or not.
*
* @name Phaser.GameObjects.Text.TextStyle#shadowStroke
* @name Phaser.GameObjects.TextStyle#shadowStroke
* @type {boolean}
* @default false
* @since 3.0.0
@ -209,7 +213,7 @@ var TextStyle = new Class({
/**
* Whether shadow fill is enabled or not.
*
* @name Phaser.GameObjects.Text.TextStyle#shadowFill
* @name Phaser.GameObjects.TextStyle#shadowFill
* @type {boolean}
* @default false
* @since 3.0.0
@ -219,7 +223,7 @@ var TextStyle = new Class({
/**
* The text alignment.
*
* @name Phaser.GameObjects.Text.TextStyle#align
* @name Phaser.GameObjects.TextStyle#align
* @type {string}
* @default 'left'
* @since 3.0.0
@ -229,7 +233,7 @@ var TextStyle = new Class({
/**
* The maximum number of lines to draw.
*
* @name Phaser.GameObjects.Text.TextStyle#maxLines
* @name Phaser.GameObjects.TextStyle#maxLines
* @type {integer}
* @default 0
* @since 3.0.0
@ -241,7 +245,7 @@ var TextStyle = new Class({
*
* `0` means no fixed with.
*
* @name Phaser.GameObjects.Text.TextStyle#fixedWidth
* @name Phaser.GameObjects.TextStyle#fixedWidth
* @type {number}
* @default 0
* @since 3.0.0
@ -253,7 +257,7 @@ var TextStyle = new Class({
*
* `0` means no fixed height.
*
* @name Phaser.GameObjects.Text.TextStyle#fixedHeight
* @name Phaser.GameObjects.TextStyle#fixedHeight
* @type {number}
* @default 0
* @since 3.0.0
@ -264,7 +268,7 @@ var TextStyle = new Class({
* The resolution the text is rendered to its internal canvas at.
* The default is 0, which means it will use the resolution set in the Game Config.
*
* @name Phaser.GameObjects.Text.TextStyle#resolution
* @name Phaser.GameObjects.TextStyle#resolution
* @type {number}
* @default 0
* @since 3.12.0
@ -274,7 +278,7 @@ var TextStyle = new Class({
/**
* Whether the text should render right to left.
*
* @name Phaser.GameObjects.Text.TextStyle#rtl
* @name Phaser.GameObjects.TextStyle#rtl
* @type {boolean}
* @default false
* @since 3.0.0
@ -284,7 +288,7 @@ var TextStyle = new Class({
/**
* The test string to use when measuring the font.
*
* @name Phaser.GameObjects.Text.TextStyle#testString
* @name Phaser.GameObjects.TextStyle#testString
* @type {string}
* @default '|MÉqgy'
* @since 3.0.0
@ -294,7 +298,7 @@ var TextStyle = new Class({
/**
* The amount of horizontal padding adding to the width of the text when calculating the font metrics.
*
* @name Phaser.GameObjects.Text.TextStyle#baselineX
* @name Phaser.GameObjects.TextStyle#baselineX
* @type {number}
* @default 1.2
* @since 3.3.0
@ -304,7 +308,7 @@ var TextStyle = new Class({
/**
* The amount of vertical padding adding to the width of the text when calculating the font metrics.
*
* @name Phaser.GameObjects.Text.TextStyle#baselineY
* @name Phaser.GameObjects.TextStyle#baselineY
* @type {number}
* @default 1.4
* @since 3.3.0
@ -314,7 +318,7 @@ var TextStyle = new Class({
/**
* The font style, size and family.
*
* @name Phaser.GameObjects.Text.TextStyle#_font
* @name Phaser.GameObjects.TextStyle#_font
* @type {string}
* @private
* @since 3.0.0
@ -354,7 +358,7 @@ var TextStyle = new Class({
* backgroundColor: '#ff00ff'
* });
*
* @method Phaser.GameObjects.Text.TextStyle#setStyle
* @method Phaser.GameObjects.TextStyle#setStyle
* @since 3.0.0
*
* @param {object} style - The style settings to set.
@ -420,7 +424,7 @@ var TextStyle = new Class({
/**
* Synchronize the font settings to the given Canvas Rendering Context.
*
* @method Phaser.GameObjects.Text.TextStyle#syncFont
* @method Phaser.GameObjects.TextStyle#syncFont
* @since 3.0.0
*
* @param {HTMLCanvasElement} canvas - The Canvas Element.
@ -434,7 +438,7 @@ var TextStyle = new Class({
/**
* Synchronize the text style settings to the given Canvas Rendering Context.
*
* @method Phaser.GameObjects.Text.TextStyle#syncStyle
* @method Phaser.GameObjects.TextStyle#syncStyle
* @since 3.0.0
*
* @param {HTMLCanvasElement} canvas - The Canvas Element.
@ -455,7 +459,7 @@ var TextStyle = new Class({
/**
* Synchronize the shadow settings to the given Canvas Rendering Context.
*
* @method Phaser.GameObjects.Text.TextStyle#syncShadow
* @method Phaser.GameObjects.TextStyle#syncShadow
* @since 3.0.0
*
* @param {CanvasRenderingContext2D} context - The Canvas Rendering Context.
@ -482,7 +486,7 @@ var TextStyle = new Class({
/**
* Update the style settings for the parent Text object.
*
* @method Phaser.GameObjects.Text.TextStyle#update
* @method Phaser.GameObjects.TextStyle#update
* @since 3.0.0
*
* @param {boolean} recalculateMetrics - Whether to recalculate font and text metrics.
@ -509,7 +513,7 @@ var TextStyle = new Class({
* If an object is given, the `fontFamily`, `fontSize` and `fontStyle`
* properties of that object are set.
*
* @method Phaser.GameObjects.Text.TextStyle#setFont
* @method Phaser.GameObjects.TextStyle#setFont
* @since 3.0.0
*
* @param {(string|object)} font - The font family or font settings to set.
@ -560,7 +564,7 @@ var TextStyle = new Class({
/**
* Set the font family.
*
* @method Phaser.GameObjects.Text.TextStyle#setFontFamily
* @method Phaser.GameObjects.TextStyle#setFontFamily
* @since 3.0.0
*
* @param {string} family - The font family.
@ -582,7 +586,7 @@ var TextStyle = new Class({
/**
* Set the font style.
*
* @method Phaser.GameObjects.Text.TextStyle#setFontStyle
* @method Phaser.GameObjects.TextStyle#setFontStyle
* @since 3.0.0
*
* @param {string} style - The font style.
@ -604,7 +608,7 @@ var TextStyle = new Class({
/**
* Set the font size.
*
* @method Phaser.GameObjects.Text.TextStyle#setFontSize
* @method Phaser.GameObjects.TextStyle#setFontSize
* @since 3.0.0
*
* @param {(number|string)} size - The font size.
@ -631,7 +635,7 @@ var TextStyle = new Class({
/**
* Set the test string to use when measuring the font.
*
* @method Phaser.GameObjects.Text.TextStyle#setTestString
* @method Phaser.GameObjects.TextStyle#setTestString
* @since 3.0.0
*
* @param {string} string - The test string to use when measuring the font.
@ -650,7 +654,7 @@ var TextStyle = new Class({
*
* Pass in `0` for either of these parameters to disable fixed width or height respectively.
*
* @method Phaser.GameObjects.Text.TextStyle#setFixedSize
* @method Phaser.GameObjects.TextStyle#setFixedSize
* @since 3.0.0
*
* @param {number} width - The fixed width to set.
@ -679,7 +683,7 @@ var TextStyle = new Class({
/**
* Set the background color.
*
* @method Phaser.GameObjects.Text.TextStyle#setBackgroundColor
* @method Phaser.GameObjects.TextStyle#setBackgroundColor
* @since 3.0.0
*
* @param {string} color - The background color.
@ -696,7 +700,7 @@ var TextStyle = new Class({
/**
* Set the text fill color.
*
* @method Phaser.GameObjects.Text.TextStyle#setFill
* @method Phaser.GameObjects.TextStyle#setFill
* @since 3.0.0
*
* @param {string} color - The text fill color.
@ -713,7 +717,7 @@ var TextStyle = new Class({
/**
* Set the text fill color.
*
* @method Phaser.GameObjects.Text.TextStyle#setColor
* @method Phaser.GameObjects.TextStyle#setColor
* @since 3.0.0
*
* @param {string} color - The text fill color.
@ -736,7 +740,7 @@ var TextStyle = new Class({
*
* Please use with caution, as the more high res Text you have, the more memory it uses up.
*
* @method Phaser.GameObjects.Text.TextStyle#setResolution
* @method Phaser.GameObjects.TextStyle#setResolution
* @since 3.12.0
*
* @param {number} value - The resolution for this Text object to use.
@ -753,7 +757,7 @@ var TextStyle = new Class({
/**
* Set the stroke settings.
*
* @method Phaser.GameObjects.Text.TextStyle#setStroke
* @method Phaser.GameObjects.TextStyle#setStroke
* @since 3.0.0
*
* @param {string} color - The stroke color.
@ -789,7 +793,7 @@ var TextStyle = new Class({
* Calling this method always re-measures the parent Text object,
* so only call it when you actually change the shadow settings.
*
* @method Phaser.GameObjects.Text.TextStyle#setShadow
* @method Phaser.GameObjects.TextStyle#setShadow
* @since 3.0.0
*
* @param {number} [x=0] - The horizontal shadow offset.
@ -823,7 +827,7 @@ var TextStyle = new Class({
/**
* Set the shadow offset.
*
* @method Phaser.GameObjects.Text.TextStyle#setShadowOffset
* @method Phaser.GameObjects.TextStyle#setShadowOffset
* @since 3.0.0
*
* @param {number} [x=0] - The horizontal shadow offset.
@ -845,7 +849,7 @@ var TextStyle = new Class({
/**
* Set the shadow color.
*
* @method Phaser.GameObjects.Text.TextStyle#setShadowColor
* @method Phaser.GameObjects.TextStyle#setShadowColor
* @since 3.0.0
*
* @param {string} [color='#000'] - The shadow color.
@ -864,7 +868,7 @@ var TextStyle = new Class({
/**
* Set the shadow blur radius.
*
* @method Phaser.GameObjects.Text.TextStyle#setShadowBlur
* @method Phaser.GameObjects.TextStyle#setShadowBlur
* @since 3.0.0
*
* @param {number} [blur=0] - The shadow blur radius.
@ -883,7 +887,7 @@ var TextStyle = new Class({
/**
* Enable or disable shadow stroke.
*
* @method Phaser.GameObjects.Text.TextStyle#setShadowStroke
* @method Phaser.GameObjects.TextStyle#setShadowStroke
* @since 3.0.0
*
* @param {boolean} enabled - Whether shadow stroke is enabled or not.
@ -900,7 +904,7 @@ var TextStyle = new Class({
/**
* Enable or disable shadow fill.
*
* @method Phaser.GameObjects.Text.TextStyle#setShadowFill
* @method Phaser.GameObjects.TextStyle#setShadowFill
* @since 3.0.0
*
* @param {boolean} enabled - Whether shadow fill is enabled or not.
@ -919,7 +923,7 @@ var TextStyle = new Class({
*
* Pass in null to remove wrapping by width.
*
* @method Phaser.GameObjects.Text.TextStyle#setWordWrapWidth
* @method Phaser.GameObjects.TextStyle#setWordWrapWidth
* @since 3.0.0
*
* @param {number} width - The maximum width of a line in pixels. Set to null to remove wrapping.
@ -944,7 +948,7 @@ var TextStyle = new Class({
*
* Pass in null to remove wrapping by callback.
*
* @method Phaser.GameObjects.Text.TextStyle#setWordWrapCallback
* @method Phaser.GameObjects.TextStyle#setWordWrapCallback
* @since 3.0.0
*
* @param {TextStyleWordWrapCallback} callback - A custom function that will be responsible for wrapping the
@ -970,7 +974,7 @@ var TextStyle = new Class({
*
* Expects values like `'left'`, `'right'`, `'center'` or `'justified'`.
*
* @method Phaser.GameObjects.Text.TextStyle#setAlign
* @method Phaser.GameObjects.TextStyle#setAlign
* @since 3.0.0
*
* @param {string} align - The text alignment.
@ -989,7 +993,7 @@ var TextStyle = new Class({
/**
* Set the maximum number of lines to draw.
*
* @method Phaser.GameObjects.Text.TextStyle#setMaxLines
* @method Phaser.GameObjects.TextStyle#setMaxLines
* @since 3.0.0
*
* @param {integer} [max=0] - The maximum number of lines to draw.
@ -1008,7 +1012,7 @@ var TextStyle = new Class({
/**
* Get the current text metrics.
*
* @method Phaser.GameObjects.Text.TextStyle#getTextMetrics
* @method Phaser.GameObjects.TextStyle#getTextMetrics
* @since 3.0.0
*
* @return {BitmapTextMetrics} The text metrics.
@ -1027,7 +1031,7 @@ var TextStyle = new Class({
/**
* Build a JSON representation of this Text Style.
*
* @method Phaser.GameObjects.Text.TextStyle#toJSON
* @method Phaser.GameObjects.TextStyle#toJSON
* @since 3.0.0
*
* @return {object} A JSON representation of this Text Style.
@ -1049,7 +1053,7 @@ var TextStyle = new Class({
/**
* Destroy this Text Style.
*
* @method Phaser.GameObjects.Text.TextStyle#destroy
* @method Phaser.GameObjects.TextStyle#destroy
* @since 3.0.0
*/
destroy: function ()

View file

@ -16,10 +16,6 @@ var RemoveFromDOM = require('../../../dom/RemoveFromDOM');
var TextRender = require('./TextRender');
var TextStyle = require('../TextStyle');
/**
* @namespace [Phaser.GameObjects.Text] Phaser.GameObjects.Text
*/
/**
* @classdesc
* A Text Game Object.

View file

@ -6,6 +6,10 @@
var types = {};
/**
* @namespace Phaser.Loader.FileTypesManager
*/
var FileTypesManager = {
/**

View file

@ -96,7 +96,7 @@ var AudioSpriteFile = new Class({
/**
* Called by each File when it finishes loading.
*
* @method Phaser.Loader.AudioSpriteFile#onFileComplete
* @method Phaser.Loader.FileTypes.AudioSpriteFile#onFileComplete
* @since 3.7.0
*
* @param {Phaser.Loader.File} file - The File that has completed processing.
@ -132,7 +132,7 @@ var AudioSpriteFile = new Class({
/**
* Adds this file to its target cache upon successful loading and processing.
*
* @method Phaser.Loader.AudioSpriteFile#addToCache
* @method Phaser.Loader.FileTypes.AudioSpriteFile#addToCache
* @since 3.7.0
*/
addToCache: function ()

View file

@ -78,7 +78,7 @@ var MultiAtlasFile = new Class({
/**
* Called by each File when it finishes loading.
*
* @method Phaser.Loader.MultiAtlasFile#onFileComplete
* @method Phaser.Loader.FileTypes.MultiAtlasFile#onFileComplete
* @since 3.7.0
*
* @param {Phaser.Loader.File} file - The File that has completed processing.
@ -151,7 +151,7 @@ var MultiAtlasFile = new Class({
/**
* Adds this file to its target cache upon successful loading and processing.
*
* @method Phaser.Loader.MultiAtlasFile#addToCache
* @method Phaser.Loader.FileTypes.MultiAtlasFile#addToCache
* @since 3.7.0
*/
addToCache: function ()

View file

@ -30,6 +30,10 @@ var customPlugins = {};
var PluginCache = {};
/**
* @namespace Phaser.Plugins.PluginCache
*/
/**
* Static method called directly by the Core internal Plugins.
* Key is a reference used to get the plugin from the plugins object (i.e. InputPlugin)

View file

@ -227,7 +227,7 @@ var ScenePlugin = new Class({
},
/**
* @typedef {object} Phaser.Scenes.ScenePlugin.SceneTransitionConfig
* @typedef {object} SceneTransitionConfig
*
* @property {string} target - The Scene key to transition to.
* @property {integer} [duration=1000] - The duration, in ms, for the transition to last.
@ -274,7 +274,7 @@ var ScenePlugin = new Class({
* @fires Phaser.Scenes.Events#TRANSITION_OUT
* @since 3.5.0
*
* @param {Phaser.Scenes.ScenePlugin.SceneTransitionConfig} config - The transition configuration object.
* @param {SceneTransitionConfig} config - The transition configuration object.
*
* @return {boolean} `true` is the transition was started, otherwise `false`.
*/

View file

@ -24,7 +24,7 @@ var NOOP = require('../utils/NOOP');
/**
* Audio sprite sound type.
*
* @typedef {Phaser.Sound.BaseSound} Phaser.Sound.BaseSound.AudioSpriteSound
* @typedef {object} AudioSpriteSound
*
* @property {object} spritemap - Local reference to 'spritemap' object form json file generated by audiosprite tool.
*/
@ -209,7 +209,7 @@ var BaseSoundManager = new Class({
* @param {string} key - Asset key for the sound.
* @param {SoundConfig} [config] - An optional config object containing default sound settings.
*
* @return {Phaser.Sound.BaseSound.AudioSpriteSound} The new audio sprite sound instance.
* @return {AudioSpriteSound} The new audio sprite sound instance.
*/
addAudioSprite: function (key, config)
{

View file

@ -402,7 +402,7 @@ var CanvasTexture = new Class({
/**
* An object containing the position and color data for a single pixel in a CanvasTexture.
*
* @typedef {object} Phaser.Textures.CanvasTexture.PixelConfig
* @typedef {object} PixelConfig
*
* @property {integer} x - The x-coordinate of the pixel.
* @property {integer} y - The y-coordinate of the pixel.
@ -427,7 +427,7 @@ var CanvasTexture = new Class({
* @param {integer} width - The width of the region to get. Must be an integer.
* @param {integer} [height] - The height of the region to get. Must be an integer. If not given will be set to the `width`.
*
* @return {Phaser.Textures.CanvasTexture.PixelConfig[]} An array of Pixel objects.
* @return {PixelConfig[]} An array of Pixel objects.
*/
getPixels: function (x, y, width, height)
{