This commit is contained in:
Richard Davey 2018-03-21 03:17:00 +00:00
commit db613c793a
234 changed files with 1013 additions and 835 deletions

View file

@ -9,15 +9,15 @@ var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have a public `angle` property,
* and then adds the given value to each of their `angle` properties.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `Angle(group.getChildren(), value, step)`
*
* @function Phaser.Actions.Angle
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `angle` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -16,7 +16,7 @@
* @function Phaser.Actions.Call
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {CallCallback} callback - The callback to be invoked. It will be passed just one argument: the item from the array.
* @param {object} context - The scope in which the callback will be invoked.
*

View file

@ -8,16 +8,16 @@
* Takes an array of objects and returns the first element in the array that has properties which match
* all of those specified in the `compare` object. For example, if the compare object was: `{ scaleX: 0.5, alpha: 1 }`
* then it would return the first item which had the property `scaleX` set to 0.5 and `alpha` set to 1.
*
*
* To use this with a Group: `GetFirst(group.getChildren(), compare, index)`
*
* @function Phaser.Actions.GetFirst
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be searched by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be searched by this action.
* @param {object} compare - The comparison object. Each property in this object will be checked against the items of the array.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
*
*
* @return {object} The first object in the array that matches the comparison object, or `null` if no match was found.
*/
var GetFirst = function (items, compare, index)

View file

@ -8,16 +8,16 @@
* Takes an array of objects and returns the last element in the array that has properties which match
* all of those specified in the `compare` object. For example, if the compare object was: `{ scaleX: 0.5, alpha: 1 }`
* then it would return the last item which had the property `scaleX` set to 0.5 and `alpha` set to 1.
*
*
* To use this with a Group: `GetLast(group.getChildren(), compare, index)`
*
* @function Phaser.Actions.GetLast
* @since 3.3.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be searched by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be searched by this action.
* @param {object} compare - The comparison object. Each property in this object will be checked against the items of the array.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
*
*
* @return {object} The last object in the array that matches the comparison object, or `null` if no match was found.
*/
var GetLast = function (items, compare, index)

View file

@ -32,8 +32,8 @@ var tempZone = new Zone({ sys: { queueDepthSort: NOOP }}, 0, 0, 1, 1);
*
* @function Phaser.Actions.GridAlign
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {GridAlignConfig} options - The GridAlign Configuration object.
*
* @return {array} The array of objects that were passed to this Action.

View file

@ -9,15 +9,15 @@ var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have a public `alpha` property,
* and then adds the given value to each of their `alpha` properties.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `IncAlpha(group.getChildren(), value, step)`
*
* @function Phaser.Actions.IncAlpha
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `alpha` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -9,15 +9,15 @@ var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have a public `x` property,
* and then adds the given value to each of their `x` properties.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `IncX(group.getChildren(), value, step)`
*
* @function Phaser.Actions.IncX
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `x` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -9,17 +9,17 @@ var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have public `x` and `y` properties,
* and then adds the given value to each of them.
*
*
* The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `IncXY(group.getChildren(), x, y, stepX, stepY)`
*
* @function Phaser.Actions.IncXY
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} x - The amount to be added to the `x` property.
* @param {number} [y] - The amount to be added to the `y` property. If `undefined` or `null` it uses the `x` value.
* @param {number} [y=x] - The amount to be added to the `y` property. If `undefined` or `null` it uses the `x` value.
* @param {number} [stepX=0] - This is added to the `x` amount, multiplied by the iteration counter.
* @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -9,15 +9,15 @@ var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have a public `y` property,
* and then adds the given value to each of their `y` properties.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `IncY(group.getChildren(), value, step)`
*
* @function Phaser.Actions.IncY
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `y` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -9,8 +9,8 @@
*
* @function Phaser.Actions.PlaceOnCircle
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Circle} circle - [description]
* @param {number} [startAngle=0] - [description]
* @param {number} [endAngle=6.28] - [description]

View file

@ -9,8 +9,8 @@
*
* @function Phaser.Actions.PlaceOnEllipse
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Ellipse} ellipse - [description]
* @param {number} [startAngle=0] - [description]
* @param {number} [endAngle=6.28] - [description]

View file

@ -11,8 +11,8 @@ var GetPoints = require('../geom/line/GetPoints');
*
* @function Phaser.Actions.PlaceOnLine
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Line} line - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.

View file

@ -19,8 +19,8 @@ var RotateRight = require('../utils/array/RotateRight');
*
* @function Phaser.Actions.PlaceOnRectangle
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Rectangle} rect - [description]
* @param {integer} [shift=1] - [description]
*

View file

@ -13,7 +13,7 @@ var BresenhamPoints = require('../geom/line/BresenhamPoints');
* @function Phaser.Actions.PlaceOnTriangle
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Triangle} triangle - [description]
* @param {number} [stepRate=1] - [description]
*

View file

@ -9,10 +9,10 @@
*
* @function Phaser.Actions.PlayAnimation
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {string} key - [description]
* @param {string|integer} [startFrame] - [description]
* @param {(string|integer)} [startFrame] - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/

View file

@ -7,15 +7,15 @@
/**
* Takes an array of Game Objects, or any objects that have a public property as defined in `key`,
* and then adds the given value to it.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `PropertyValueInc(group.getChildren(), key, value, step)`
*
* @function Phaser.Actions.PropertyValueInc
* @since 3.3.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {string} key - The property to be updated.
* @param {number} value - The amount to be added to the property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.

View file

@ -7,15 +7,15 @@
/**
* Takes an array of Game Objects, or any objects that have a public property as defined in `key`,
* and then sets it to the given value.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `PropertyValueSet(group.getChildren(), key, value, step)`
*
* @function Phaser.Actions.PropertyValueSet
* @since 3.3.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {string} key - The property to be updated.
* @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.

View file

@ -11,8 +11,8 @@ var Random = require('../geom/circle/Random');
*
* @function Phaser.Actions.RandomCircle
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Circle} circle - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.

View file

@ -11,8 +11,8 @@ var Random = require('../geom/ellipse/Random');
*
* @function Phaser.Actions.RandomEllipse
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Ellipse} ellipse - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.

View file

@ -11,8 +11,8 @@ var Random = require('../geom/line/Random');
*
* @function Phaser.Actions.RandomLine
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Line} line - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.

View file

@ -11,8 +11,8 @@ var Random = require('../geom/rectangle/Random');
*
* @function Phaser.Actions.RandomRectangle
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Rectangle} rect - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.

View file

@ -11,8 +11,8 @@ var Random = require('../geom/triangle/Random');
*
* @function Phaser.Actions.RandomTriangle
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Triangle} triangle - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.

View file

@ -9,15 +9,15 @@ var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have a public `rotation` property,
* and then adds the given value to each of their `rotation` properties.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `Rotate(group.getChildren(), value, step)`
*
* @function Phaser.Actions.Rotate
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `rotation` property (in radians).
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -12,8 +12,8 @@ var DistanceBetween = require('../math/distance/DistanceBetween');
*
* @function Phaser.Actions.RotateAround
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {object} point - Any object with public `x` and `y` properties.
* @param {number} angle - The angle to rotate by, in radians.
*

View file

@ -12,7 +12,7 @@ var MathRotateAroundDistance = require('../math/RotateAroundDistance');
* @function Phaser.Actions.RotateAroundDistance
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {object} point - Any object with public `x` and `y` properties.
* @param {number} angle - The angle to rotate by, in radians.
* @param {number} distance - The distance from the point of rotation in pixels.

View file

@ -9,15 +9,15 @@ var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have a public `scaleX` property,
* and then adds the given value to each of their `scaleX` properties.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `ScaleX(group.getChildren(), value, step)`
*
* @function Phaser.Actions.ScaleX
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `scaleX` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -9,15 +9,15 @@ var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have public `scaleX` and `scaleY` properties,
* and then adds the given value to each of them.
*
*
* The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `ScaleXY(group.getChildren(), scaleX, scaleY, stepX, stepY)`
*
* @function Phaser.Actions.ScaleXY
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} scaleX - The amount to be added to the `scaleX` property.
* @param {number} [scaleY] - The amount to be added to the `scaleY` property. If `undefined` or `null` it uses the `scaleX` value.
* @param {number} [stepX=0] - This is added to the `scaleX` amount, multiplied by the iteration counter.

View file

@ -9,15 +9,15 @@ var PropertyValueInc = require('./PropertyValueInc');
/**
* Takes an array of Game Objects, or any objects that have a public `scaleY` property,
* and then adds the given value to each of their `scaleY` properties.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `ScaleY(group.getChildren(), value, step)`
*
* @function Phaser.Actions.ScaleY
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to be added to the `scaleY` property.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -9,15 +9,15 @@ var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `alpha`
* and then sets it to the given value.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `SetAlpha(group.getChildren(), value, step)`
*
* @function Phaser.Actions.SetAlpha
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -9,15 +9,15 @@ var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `blendMode`
* and then sets it to the given value.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `SetBlendMode(group.getChildren(), value)`
*
* @function Phaser.Actions.SetBlendMode
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.

View file

@ -9,15 +9,15 @@ var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `depth`
* and then sets it to the given value.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `SetDepth(group.getChildren(), value, step)`
*
* @function Phaser.Actions.SetDepth
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -10,8 +10,8 @@
* @function Phaser.Actions.SetHitArea
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {any} hitArea - [description]
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {*} hitArea - [description]
* @param {HitAreaCallback} hitAreaCallback - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.

View file

@ -9,15 +9,15 @@ var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public properties `originX` and `originY`
* and then sets them to the given values.
*
*
* The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `SetOrigin(group.getChildren(), originX, originY, stepX, stepY)`
*
* @function Phaser.Actions.SetOrigin
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} originX - The amount to set the `originX` property to.
* @param {number} [originY] - The amount to set the `originY` property to. If `undefined` or `null` it uses the `originX` value.
* @param {number} [stepX=0] - This is added to the `originX` amount, multiplied by the iteration counter.

View file

@ -9,15 +9,15 @@ var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `rotation`
* and then sets it to the given value.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `SetRotation(group.getChildren(), value, step)`
*
* @function Phaser.Actions.SetRotation
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -9,15 +9,15 @@ var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public properties `scaleX` and `scaleY`
* and then sets them to the given values.
*
*
* The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `SetScale(group.getChildren(), scaleX, scaleY, stepX, stepY)`
*
* @function Phaser.Actions.SetScale
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} scaleX - The amount to set the `scaleX` property to.
* @param {number} [scaleY] - The amount to set the `scaleY` property to. If `undefined` or `null` it uses the `scaleX` value.
* @param {number} [stepX=0] - This is added to the `scaleX` amount, multiplied by the iteration counter.

View file

@ -9,15 +9,15 @@ var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `scaleX`
* and then sets it to the given value.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `SetScaleX(group.getChildren(), value, step)`
*
* @function Phaser.Actions.SetScaleX
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -9,15 +9,15 @@ var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `scaleY`
* and then sets it to the given value.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `SetScaleY(group.getChildren(), value, step)`
*
* @function Phaser.Actions.SetScaleY
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -9,8 +9,8 @@
*
* @function Phaser.Actions.SetTint
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {number} topLeft - [description]
* @param {number} [topRight] - [description]
* @param {number} [bottomLeft] - [description]

View file

@ -9,13 +9,13 @@ var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `visible`
* and then sets it to the given value.
*
*
* To use this with a Group: `SetVisible(group.getChildren(), value)`
*
* @function Phaser.Actions.SetVisible
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {boolean} value - The value to set the property to.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.
* @param {integer} [direction=1] - The direction to iterate through the array. 1 is from beginning to end, -1 from end to beginning.

View file

@ -9,15 +9,15 @@ var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `x`
* and then sets it to the given value.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `SetX(group.getChildren(), value, step)`
*
* @function Phaser.Actions.SetX
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -9,17 +9,17 @@ var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public properties `x` and `y`
* and then sets them to the given values.
*
*
* The optional `stepX` and `stepY` properties are applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `SetXY(group.getChildren(), x, y, stepX, stepY)`
*
* @function Phaser.Actions.SetXY
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} x - The amount to set the `x` property to.
* @param {number} [y] - The amount to set the `y` property to. If `undefined` or `null` it uses the `x` value.
* @param {number} [y=x] - The amount to set the `y` property to. If `undefined` or `null` it uses the `x` value.
* @param {number} [stepX=0] - This is added to the `x` amount, multiplied by the iteration counter.
* @param {number} [stepY=0] - This is added to the `y` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -9,15 +9,15 @@ var PropertyValueSet = require('./PropertyValueSet');
/**
* Takes an array of Game Objects, or any objects that have the public property `y`
* and then sets it to the given value.
*
*
* The optional `step` property is applied incrementally, multiplied by each item in the array.
*
*
* To use this with a Group: `SetY(group.getChildren(), value, step)`
*
* @function Phaser.Actions.SetY
* @since 3.0.0
*
* @param {array|Phaser.GameObjects.GameObject[]} items - The array of items to be updated by this action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - The array of items to be updated by this action.
* @param {number} value - The amount to set the property to.
* @param {number} [step=0] - This is added to the `value` amount, multiplied by the iteration counter.
* @param {integer} [index=0] - An optional offset to start searching from within the items array.

View file

@ -6,22 +6,20 @@
var Vector2 = require('../math/Vector2');
// Iterate through items changing the position of each element to
// be that of the element that came before it in the array (or after it if direction = 1)
// The first items position is set to x/y.
// The final x/y coords are returned
/**
* [description]
* Iterate through items changing the position of each element to
* be that of the element that came before it in the array (or after it if direction = 1)
* The first items position is set to x/y.
* The final x/y coords are returned
*
* @function Phaser.Actions.ShiftPosition
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {number} x - [description]
* @param {number} y - [description]
* @param {integer} [direction=0] - [description]
* @param {Phaser.Math.Vector2|object} [output] - [description]
* @param {(Phaser.Math.Vector2|object)} [output] - [description]
*
* @return {Phaser.Math.Vector2} The output vector.
*/

View file

@ -11,8 +11,8 @@ var ArrayShuffle = require('../utils/array/Shuffle');
*
* @function Phaser.Actions.Shuffle
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @return {array} The array of Game Objects that was passed to this Action.
*/

View file

@ -11,8 +11,8 @@ var MathSmoothStep = require('../math/SmoothStep');
*
* @function Phaser.Actions.SmoothStep
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {string} property - [description]
* @param {number} min - [description]
* @param {number} max - [description]

View file

@ -11,8 +11,8 @@ var MathSmootherStep = require('../math/SmootherStep');
*
* @function Phaser.Actions.SmootherStep
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {string} property - [description]
* @param {number} min - [description]
* @param {number} max - [description]

View file

@ -9,12 +9,12 @@
*
* @function Phaser.Actions.Spread
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {string} property - [description]
* @param {number} min - [description]
* @param {number} max - [description]
* @param {number} inc - [description]
* @param {number} [inc=false] - [description]
*
* @return {array} The array of Game Objects that was passed to this Action.
*/

View file

@ -9,8 +9,8 @@
*
* @function Phaser.Actions.ToggleVisible
* @since 3.0.0
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
*
* @return {array} The array of Game Objects that was passed to this Action.
*/

View file

@ -11,10 +11,10 @@ var Wrap = require('../math/Wrap');
* Wrap each item's coordinates within a rectangle's area.
*
* @function Phaser.Actions.WrapInRectangle
* @since [version]
* @since 3.0.0
* @see Phaser.Math.Wrap
*
* @param {array} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {(array|Phaser.GameObjects.GameObject[])} items - An array of Game Objects. The contents of this array are updated by this Action.
* @param {Phaser.Geom.Rectangle} rect - The rectangle.
* @param {number} [padding=0] - An amount added to each side of the rectangle during the operation.
*

View file

@ -29,7 +29,7 @@ var GetValue = require('../utils/object/GetValue');
* @typedef {object} AnimationFrameConfig
*
* @property {string} key - [description]
* @property {string|number} frame - [description]
* @property {(string|number)} frame - [description]
* @property {float} [duration=0] - [description]
* @property {boolean} [visible] - [description]
* @property {function} [onUpdate] - [description]
@ -350,7 +350,7 @@ var Animation = new Class({
* @method Phaser.Animations.Animation#addFrame
* @since 3.0.0
*
* @param {string|AnimationFrameConfig[]} config - [description]
* @param {(string|AnimationFrameConfig[])} config - [description]
*
* @return {Phaser.Animations.Animation} This Animation object.
*/
@ -368,7 +368,7 @@ var Animation = new Class({
* @since 3.0.0
*
* @param {integer} index - [description]
* @param {string|AnimationFrameConfig[]} config - [description]
* @param {(string|AnimationFrameConfig[])} config - [description]
*
* @return {Phaser.Animations.Animation} This Animation object.
*/
@ -478,7 +478,7 @@ var Animation = new Class({
* @since 3.0.0
*
* @param {Phaser.Textures.TextureManager} textureManager - [description]
* @param {string|AnimationFrameConfig[]} frames - [description]
* @param {(string|AnimationFrameConfig[])} frames - [description]
* @param {string} [defaultTextureKey] - [description]
*
* @return {Phaser.Animations.AnimationFrame[]} [description]

View file

@ -10,7 +10,7 @@ var Class = require('../utils/Class');
* @typedef {object} JSONAnimationFrame
*
* @property {string} key - The key of the Texture this AnimationFrame uses.
* @property {string|integer} frame - The key of the Frame within the Texture that this AnimationFrame uses.
* @property {(string|integer)} frame - The key of the Frame within the Texture that this AnimationFrame uses.
* @property {number} duration - Additional time (in ms) that this frame should appear for during playback.
*/
@ -30,7 +30,7 @@ var Class = require('../utils/Class');
* @since 3.0.0
*
* @param {string} textureKey - The key of the Texture this AnimationFrame uses.
* @param {string|integer} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses.
* @param {(string|integer)} textureFrame - The key of the Frame within the Texture that this AnimationFrame uses.
* @param {integer} index - The index of this AnimationFrame within the Animation sequence.
* @param {Phaser.Textures.Frame} frame - A reference to the Texture Frame this AnimationFrame uses for rendering.
*/
@ -53,7 +53,7 @@ var AnimationFrame = new Class({
* The key of the Frame within the Texture that this AnimationFrame uses.
*
* @name Phaser.Animations.AnimationFrame#textureFrame
* @type {string|integer}
* @type {(string|integer)}
* @since 3.0.0
*/
this.textureFrame = textureFrame;

View file

@ -186,7 +186,7 @@ var AnimationManager = new Class({
* @method Phaser.Animations.AnimationManager#fromJSON
* @since 3.0.0
*
* @param {string|object} data - [description]
* @param {(string|object)} data - [description]
* @param {boolean} [clearCurrentAnimations=false] - [description]
*
* @return {Phaser.Animations.Animation[]} An array containing all of the Animation objects that were created as a result of this call.
@ -394,7 +394,7 @@ var AnimationManager = new Class({
*
* @param {Phaser.GameObjects.GameObject} child - [description]
* @param {string} key - [description]
* @param {string|integer} [startFrame] - [description]
* @param {(string|integer)} [startFrame] - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
*/

View file

@ -41,7 +41,7 @@ var ValueToColor = require('../display/color/ValueToColor');
* @property {string} [path] - [description]
* @property {boolean} [enableParallel=true] - [description]
* @property {integer} [maxParallelDownloads=4] - [description]
* @property {string|undefined} [crossOrigin=undefined] - [description]
* @property {(string|undefined)} [crossOrigin=undefined] - [description]
* @property {string} [responseType] - [description]
* @property {boolean} [async=true] - [description]
* @property {string} [user] - [description]
@ -52,8 +52,8 @@ var ValueToColor = require('../display/color/ValueToColor');
/**
* @typedef {object} GameConfig
*
* @property {integer|string} [width=1024] - [description]
* @property {integer|string} [height=768] - [description]
* @property {(integer|string)} [width=1024] - [description]
* @property {(integer|string)} [height=768] - [description]
* @property {number} [zoom=1] - [description]
* @property {number} [resolution=1] - [description]
* @property {number} [type=CONST.AUTO] - [description]
@ -90,7 +90,7 @@ var ValueToColor = require('../display/color/ValueToColor');
* @property {boolean} [preserveDrawingBuffer=false] - [description]
* @property {boolean} [failIfMajorPerformanceCaveat=false] - [description]
* @property {boolean} [powerPreference='default'] - "high-performance", "low-power" or "default"
* @property {string|number} [backgroundColor=0x000000] - [description]
* @property {(string|number)} [backgroundColor=0x000000] - [description]
* @property {object} [?callbacks] - [description]
* @property {BootCallback} [callbacks.preBoot=NOOP] - [description]
* @property {BootCallback} [callbacks.postBoot=NOOP] - [description]

View file

@ -68,7 +68,7 @@ var Game = new Class({
* A reference to either the Canvas or WebGL Renderer that this Game is using.
*
* @name Phaser.Game#renderer
* @type {Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer}
* @type {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)}
* @since 3.0.0
*/
this.renderer = null;
@ -323,7 +323,7 @@ var Game = new Class({
* the Scenes for rendering, but it won't have actually drawn anything yet.
*
* @event Phaser.Game#prerenderEvent
* @param {Phaser.Renderer.CanvasRenderer|Phaser.Renderer.WebGLRenderer} renderer - A reference to the current renderer.
* @param {(Phaser.Renderer.CanvasRenderer|Phaser.Renderer.WebGLRenderer)} renderer - A reference to the current renderer.
*/
/**
@ -333,7 +333,7 @@ var Game = new Class({
* Every Scene will have rendered and drawn to the canvas.
*
* @event Phaser.Game#postrenderEvent
* @param {Phaser.Renderer.CanvasRenderer|Phaser.Renderer.WebGLRenderer} renderer - A reference to the current renderer.
* @param {(Phaser.Renderer.CanvasRenderer|Phaser.Renderer.WebGLRenderer)} renderer - A reference to the current renderer.
*/
/**

View file

@ -56,7 +56,7 @@ var BaseCache = new Class({
* @event Phaser.Cache.BaseCache#addEvent
* @param {Phaser.Cache.BaseCache} The BaseCache to which the object was added.
* @param {string} The key of the object added to the cache.
* @param {any} A reference to the object added to the cache.
* @param {*} A reference to the object added to the cache.
*/
/**
@ -68,7 +68,7 @@ var BaseCache = new Class({
* @since 3.0.0
*
* @param {string} key - The unique key by which the data added to the cache will be referenced.
* @param {any} data - The data to be stored in the cache.
* @param {*} data - The data to be stored in the cache.
*
* @return {Phaser.Cache.BaseCache} This BaseCache object.
*/
@ -88,7 +88,7 @@ var BaseCache = new Class({
* @since 3.0.0
*
* @param {string} key - The unique key of the item to be checked in this cache.
*
*
* @return {boolean} Returns `true` if the cache contains an item matching the given key, otherwise `false`.
*/
has: function (key)
@ -103,8 +103,8 @@ var BaseCache = new Class({
* @since 3.0.0
*
* @param {string} key - The unique key of the item to be retrieved from this cache.
*
* @return {any} The item in the cache, or `null` if no item matching the given key was found.
*
* @return {*} The item in the cache, or `null` if no item matching the given key was found.
*/
get: function (key)
{
@ -119,7 +119,7 @@ var BaseCache = new Class({
* @event Phaser.Cache.BaseCache#removeEvent
* @param {Phaser.Cache.BaseCache} The BaseCache from which the object was removed.
* @param {string} The key of the object removed from the cache.
* @param {any} The object that was removed from the cache.
* @param {*} The object that was removed from the cache.
*/
/**

View file

@ -874,7 +874,7 @@ var Camera = new Class({
*
* @param {number} x - [description]
* @param {number} y - [description]
* @param {object|Phaser.Math.Vector2} output - [description]
* @param {(object|Phaser.Math.Vector2)} output - [description]
*
* @return {Phaser.Math.Vector2} [description]
*/
@ -935,7 +935,7 @@ var Camera = new Class({
* @method Phaser.Cameras.Scene2D.Camera#ignore
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[]} gameObjectOrArray - [description]
* @param {(Phaser.GameObjects.GameObject|Phaser.GameObjects.GameObject[])} gameObjectOrArray - [description]
*
* @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.
*/
@ -1068,7 +1068,7 @@ var Camera = new Class({
* @method Phaser.Cameras.Scene2D.Camera#setBackgroundColor
* @since 3.0.0
*
* @param {string|number|InputColorObject} color - [description]
* @param {(string|number|InputColorObject)} color - [description]
*
* @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.
*/
@ -1288,7 +1288,7 @@ var Camera = new Class({
* @method Phaser.Cameras.Scene2D.Camera#startFollow
* @since 3.0.0
*
* @param {Phaser.GameObjects.GameObject|object} target - [description]
* @param {(Phaser.GameObjects.GameObject|object)} target - [description]
* @param {boolean} roundPx - [description]
*
* @return {Phaser.Cameras.Scene2D.Camera} This Camera instance.

View file

@ -236,7 +236,7 @@ var CameraManager = new Class({
* @method Phaser.Cameras.Scene2D.CameraManager#fromJSON
* @since 3.0.0
*
* @param {object|object[]} config - [description]
* @param {(object|object[])} config - [description]
*
* @return {Phaser.Cameras.Scene2D.CameraManager} [description]
*/
@ -375,7 +375,7 @@ var CameraManager = new Class({
* @method Phaser.Cameras.Scene2D.CameraManager#render
* @since 3.0.0
*
* @param {Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer} renderer - The Renderer that will render the children to this camera.
* @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - The Renderer that will render the children to this camera.
* @param {Phaser.GameObjects.GameObject[]} children - An array of renderable Game Objects.
* @param {number} interpolation - Interpolation value. Reserved for future use.
*/

View file

@ -24,7 +24,7 @@ var GetValue = require('../../utils/object/GetValue');
* @property {Phaser.Input.Keyboard.Key} [zoomIn] - The Key to be pressed that will zoom the Camera in.
* @property {Phaser.Input.Keyboard.Key} [zoomOut] - The Key to be pressed that will zoom the Camera out.
* @property {float} [zoomSpeed=0.01] - The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed.
* @property {float|{x:float,y:float}} [speed=0] - The horizontal and vertical speed the camera will move.
* @property {(float|{x:float,y:float})} [speed=0] - The horizontal and vertical speed the camera will move.
*/
/**

View file

@ -31,9 +31,9 @@ var GetValue = require('../../utils/object/GetValue');
* @property {Phaser.Input.Keyboard.Key} [zoomIn] - The Key to be pressed that will zoom the Camera in.
* @property {Phaser.Input.Keyboard.Key} [zoomOut] - The Key to be pressed that will zoom the Camera out.
* @property {float} [zoomSpeed=0.01] - The speed at which the camera will zoom if the `zoomIn` or `zoomOut` keys are pressed.
* @property {float|{x:float,y:float}} [acceleration=0] - The horizontal and vertical acceleration the camera will move.
* @property {float|{x:float,y:float}} [drag=0] - The horizontal and vertical drag applied to the camera when it is moving.
* @property {float|{x:float,y:float}} [maxSpeed=0] - The maximum horizontal and vertical speed the camera will move.
* @property {(float|{x:float,y:float})} [acceleration=0] - The horizontal and vertical acceleration the camera will move.
* @property {(float|{x:float,y:float})} [drag=0] - The horizontal and vertical drag applied to the camera when it is moving.
* @property {(float|{x:float,y:float})} [maxSpeed=0] - The maximum horizontal and vertical speed the camera will move.
*/
/**

View file

@ -368,7 +368,7 @@ var Camera = new Class({
* @param {number} y - [description]
* @param {number} z - [description]
* @param {string} key - [description]
* @param {string|number} frame - [description]
* @param {(string|number)} frame - [description]
* @param {boolean} [visible=true] - [description]
*
* @return {Phaser.GameObjects.Sprite3D} [description]
@ -399,7 +399,7 @@ var Camera = new Class({
*
* @param {number} quantity - [description]
* @param {string} key - [description]
* @param {string|number} frame - [description]
* @param {(string|number)} frame - [description]
* @param {boolean} [visible=true] - [description]
*
* @return {Phaser.GameObjects.Sprite3D[]} [description]
@ -435,10 +435,10 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#createRect
* @since 3.0.0
*
* @param {number|{x:number,y:number}} size - [description]
* @param {number|{x:number,y:number,z:number}} spacing - [description]
* @param {(number|{x:number,y:number})} size - [description]
* @param {(number|{x:number,y:number,z:number})} spacing - [description]
* @param {string} key - [description]
* @param {string|number} [frame] - [description]
* @param {(string|number)} [frame] - [description]
*
* @return {Phaser.GameObjects.Sprite3D[]} [description]
*/
@ -595,7 +595,7 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#translate
* @since 3.0.0
*
* @param {number|object} x - [description]
* @param {(number|object)} x - [description]
* @param {number} [y] - [description]
* @param {number} [z] - [description]
*
@ -625,7 +625,7 @@ var Camera = new Class({
* @method Phaser.Cameras.Sprite3D.Camera#lookAt
* @since 3.0.0
*
* @param {number|object} x - [description]
* @param {(number|object)} x - [description]
* @param {number} [y] - [description]
* @param {number} [z] - [description]
*

View file

@ -151,7 +151,7 @@ var CameraManager = new Class({
*
* @param {string} name - [description]
*
* @return {Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]
* @return {(Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera)} [description]
*/
getCamera: function (name)
{
@ -172,7 +172,7 @@ var CameraManager = new Class({
* @method Phaser.Cameras.Sprite3D.CameraManager#removeCamera
* @since 3.0.0
*
* @param {Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera} camera - [description]
* @param {(Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera)} camera - [description]
*/
removeCamera: function (camera)
{
@ -190,7 +190,7 @@ var CameraManager = new Class({
* @method Phaser.Cameras.Sprite3D.CameraManager#removeAll
* @since 3.0.0
*
* @return {Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera} [description]
* @return {(Phaser.Cameras.Sprite3D.OrthographicCamera|Phaser.Cameras.Sprite3D.PerspectiveCamera)} [description]
*/
removeAll: function ()
{

View file

@ -21,7 +21,7 @@ var Vector2 = require('../math/Vector2');
* @constructor
* @since 3.0.0
*
* @param {Phaser.Math.Vector2|Phaser.Math.Vector2[]} p0 - Start point, or an array of point pairs.
* @param {(Phaser.Math.Vector2|Phaser.Math.Vector2[])} p0 - Start point, or an array of point pairs.
* @param {Phaser.Math.Vector2} p1 - Control Point 1.
* @param {Phaser.Math.Vector2} p2 - Control Point 2.
* @param {Phaser.Math.Vector2} p3 - End Point.

View file

@ -19,7 +19,7 @@ var Vector2 = require('../math/Vector2');
* @constructor
* @since 3.2.0
*
* @param {Phaser.Math.Vector2|Phaser.Math.Vector2[]} p0 - Start point, or an array of point pairs.
* @param {(Phaser.Math.Vector2|Phaser.Math.Vector2[])} p0 - Start point, or an array of point pairs.
* @param {Phaser.Math.Vector2} p1 - Control Point 1.
* @param {Phaser.Math.Vector2} p2 - Control Point 2.
*/

View file

@ -235,7 +235,7 @@ var Path = new Class({
* @method Phaser.Curves.Path#quadraticBezierTo
* @since 3.2.0
*
* @param {number|Phaser.Math.Vector2[]} x - [description]
* @param {(number|Phaser.Math.Vector2[])} x - [description]
* @param {number} [y] - [description]
* @param {number} [controlX] - [description]
* @param {number} [controlY] - [description]
@ -516,7 +516,7 @@ var Path = new Class({
* @param {number} t - [description]
* @param {Phaser.Math.Vector2} [out] - [description]
*
* @return {Phaser.Math.Vector2|null} [description]
* @return {?Phaser.Math.Vector2} [description]
*/
getPoint: function (t, out)
{
@ -671,7 +671,7 @@ var Path = new Class({
* @method Phaser.Curves.Path#lineTo
* @since 3.0.0
*
* @param {number|Phaser.Math.Vector2} x - [description]
* @param {(number|Phaser.Math.Vector2)} x - [description]
* @param {number} [y] - [description]
*
* @return {Phaser.Curves.Path} [description]

View file

@ -9,9 +9,9 @@ var Class = require('../utils/Class');
/**
* @callback DataEachCallback
*
* @param {any} parent - [description]
* @param {*} parent - [description]
* @param {string} key - [description]
* @param {any} value - [description]
* @param {*} value - [description]
* @param {...*} [arguments] - Additional arguments that will be passed to the callback, after the game object, key, and data.
*/
@ -26,7 +26,7 @@ var Class = require('../utils/Class');
* @constructor
* @since 3.0.0
*
* @param {any} parent - [description]
* @param {*} parent - [description]
* @param {EventEmitter} eventEmitter - [description]
*/
var DataManager = new Class({
@ -39,7 +39,7 @@ var DataManager = new Class({
* [description]
*
* @name Phaser.Data.DataManager#parent
* @type {any}
* @type {*}
* @since 3.0.0
*/
this.parent = parent;
@ -100,7 +100,7 @@ var DataManager = new Class({
*
* @param {string} key - [description]
*
* @return {any} [description]
* @return {*} [description]
*/
get: function (key)
{
@ -162,7 +162,7 @@ var DataManager = new Class({
* @since 3.0.0
*
* @param {string} key - [description]
* @param {any} data - [description]
* @param {*} data - [description]
*
* @return {Phaser.Data.DataManager} This DataManager object.
*/
@ -293,7 +293,7 @@ var DataManager = new Class({
*
* @param {string} key - [description]
*
* @return {any} [description]
* @return {*} [description]
*/
pop: function (key)
{

View file

@ -20,7 +20,7 @@ var _disableContextSmoothing = false;
* before a Phaser.Game instance has even been created.
* Which means all instances of Phaser Games on the same page
* can share the one single pool
*
*
* @namespace Phaser.Display.Canvas.CanvasPool
* @since 3.0.0
*/
@ -31,12 +31,12 @@ var CanvasPool = function ()
*
* @function Phaser.Display.Canvas.CanvasPool.create
* @since 3.0.0
*
* @param {any} parent - The parent of the Canvas object.
*
* @param {*} parent - The parent of the Canvas object.
* @param {integer} [width=1] - The width of the Canvas.
* @param {integer} [height=1] - The height of the Canvas.
* @param {integer} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.
*
*
* @return {HTMLCanvasElement} [description]
*/
var create = function (parent, width, height, canvasType)
@ -74,7 +74,7 @@ var CanvasPool = function ()
{
Smoothing.disable(canvas.getContext('2d'));
}
return canvas;
};
@ -83,11 +83,11 @@ var CanvasPool = function ()
*
* @function Phaser.Display.Canvas.CanvasPool.create2D
* @since 3.0.0
*
* @param {any} parent - The parent of the Canvas object.
*
* @param {*} parent - The parent of the Canvas object.
* @param {integer} [width=1] - The width of the Canvas.
* @param {integer} [height=1] - The height of the Canvas.
*
*
* @return {HTMLCanvasElement} [description]
*/
var create2D = function (parent, width, height)
@ -100,11 +100,11 @@ var CanvasPool = function ()
*
* @function Phaser.Display.Canvas.CanvasPool.createWebGL
* @since 3.0.0
*
* @param {any} parent - The parent of the Canvas object.
*
* @param {*} parent - The parent of the Canvas object.
* @param {integer} [width=1] - The width of the Canvas.
* @param {integer} [height=1] - The height of the Canvas.
*
*
* @return {HTMLCanvasElement} [description]
*/
var createWebGL = function (parent, width, height)
@ -117,9 +117,9 @@ var CanvasPool = function ()
*
* @function Phaser.Display.Canvas.CanvasPool.first
* @since 3.0.0
*
*
* @param {integer} [canvasType=Phaser.CANVAS] - The type of the Canvas. Either `Phaser.CANVAS` or `Phaser.WEBGL`.
*
*
* @return {HTMLCanvasElement} [description]
*/
var first = function (canvasType)
@ -143,8 +143,8 @@ var CanvasPool = function ()
*
* @function Phaser.Display.Canvas.CanvasPool.remove
* @since 3.0.0
*
* @param {any} parent - [description]
*
* @param {*} parent - [description]
*/
var remove = function (parent)
{
@ -168,7 +168,7 @@ var CanvasPool = function ()
*
* @function Phaser.Display.Canvas.CanvasPool.total
* @since 3.0.0
*
*
* @return {integer} [description]
*/
var total = function ()
@ -191,7 +191,7 @@ var CanvasPool = function ()
*
* @function Phaser.Display.Canvas.CanvasPool.free
* @since 3.0.0
*
*
* @return {integer} [description]
*/
var free = function ()

View file

@ -19,7 +19,7 @@ var Smoothing = function ()
* @function Phaser.Display.Canvas.Smoothing.getPrefix
* @since 3.0.0
*
* @param {CanvasRenderingContext2D|WebGLRenderingContext} context - [description]
* @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - [description]
*
* @return {string} [description]
*/
@ -50,9 +50,9 @@ var Smoothing = function ()
* @function Phaser.Display.Canvas.Smoothing.enable
* @since 3.0.0
*
* @param {CanvasRenderingContext2D|WebGLRenderingContext} context - [description]
* @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - [description]
*
* @return {CanvasRenderingContext2D|WebGLRenderingContext} [description]
* @return {(CanvasRenderingContext2D|WebGLRenderingContext)} [description]
*/
var enable = function (context)
{
@ -79,9 +79,9 @@ var Smoothing = function ()
* @function Phaser.Display.Canvas.Smoothing.disable
* @since 3.0.0
*
* @param {CanvasRenderingContext2D|WebGLRenderingContext} context - [description]
* @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - [description]
*
* @return {CanvasRenderingContext2D|WebGLRenderingContext} [description]
* @return {(CanvasRenderingContext2D|WebGLRenderingContext)} [description]
*/
var disable = function (context)
{
@ -105,9 +105,9 @@ var Smoothing = function ()
* @function Phaser.Display.Canvas.Smoothing.isEnabled
* @since 3.0.0
*
* @param {CanvasRenderingContext2D|WebGLRenderingContext} context - [description]
* @param {(CanvasRenderingContext2D|WebGLRenderingContext)} context - [description]
*
* @return {boolean|null} [description]
* @return {?boolean} [description]
*/
var isEnabled = function (context)
{

View file

@ -16,7 +16,7 @@ var RGBStringToColor = require('./RGBStringToColor');
* @function Phaser.Display.Color.ValueToColor
* @since 3.0.0
*
* @param {string|number|InputColorObject} input - The source color value to convert.
* @param {(string|number|InputColorObject)} input - The source color value to convert.
*
* @return {Phaser.Display.Color} A Color object.
*/

View file

@ -143,7 +143,7 @@ var BitmapMask = new Class({
* @method Phaser.Display.Masks.BitmapMask#preRenderWebGL
* @since 3.0.0
*
* @param {Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer} renderer - [description]
* @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - [description]
* @param {Phaser.GameObjects.GameObject} maskedObject - [description]
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.
*/
@ -158,7 +158,7 @@ var BitmapMask = new Class({
* @method Phaser.Display.Masks.BitmapMask#postRenderWebGL
* @since 3.0.0
*
* @param {Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer} renderer - [description]
* @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - [description]
*/
postRenderWebGL: function (renderer)
{
@ -171,7 +171,7 @@ var BitmapMask = new Class({
* @method Phaser.Display.Masks.BitmapMask#preRenderCanvas
* @since 3.0.0
*
* @param {Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer} renderer - [description]
* @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - [description]
* @param {Phaser.GameObjects.GameObject} mask - [description]
* @param {Phaser.Cameras.Scene2D.Camera} camera - The Camera to render to.
*/
@ -186,7 +186,7 @@ var BitmapMask = new Class({
* @method Phaser.Display.Masks.BitmapMask#postRenderCanvas
* @since 3.0.0
*
* @param {Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer} renderer - [description]
* @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - [description]
*/
postRenderCanvas: function ()
{

View file

@ -53,7 +53,7 @@ var GeometryMask = new Class({
* @method Phaser.Display.Masks.GeometryMask#preRenderWebGL
* @since 3.0.0
*
* @param {Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer} renderer - [description]
* @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - [description]
* @param {Phaser.GameObjects.GameObject} mask - [description]
* @param {Phaser.Cameras.Scene2D.Camera} camera - [description]
*/
@ -88,7 +88,7 @@ var GeometryMask = new Class({
* @method Phaser.Display.Masks.GeometryMask#postRenderWebGL
* @since 3.0.0
*
* @param {Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer} renderer - [description]
* @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - [description]
*/
postRenderWebGL: function (renderer)
{
@ -105,7 +105,7 @@ var GeometryMask = new Class({
* @method Phaser.Display.Masks.GeometryMask#preRenderCanvas
* @since 3.0.0
*
* @param {Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer} renderer - [description]
* @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - [description]
* @param {Phaser.GameObjects.GameObject} mask - [description]
* @param {Phaser.Cameras.Scene2D.Camera} camera - [description]
*/
@ -126,7 +126,7 @@ var GeometryMask = new Class({
* @method Phaser.Display.Masks.GeometryMask#postRenderCanvas
* @since 3.0.0
*
* @param {Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer} renderer - [description]
* @param {(Phaser.Renderer.Canvas.CanvasRenderer|Phaser.Renderer.WebGL.WebGLRenderer)} renderer - [description]
*/
postRenderCanvas: function (renderer)
{

View file

@ -12,7 +12,7 @@
* @since 3.0.0
*
* @param {HTMLElement} element - The element to be added to the DOM. Usually a Canvas object.
* @param {string|HTMLElement} [parent] - The parent in which to add the element. Can be a string which is passed to `getElementById` or an actual DOM object.
* @param {(string|HTMLElement)} [parent] - The parent in which to add the element. Can be a string which is passed to `getElementById` or an actual DOM object.
* @param {boolean} [overflowHidden=true] - [description]
*
* @return {HTMLElement} The element that was added to the DOM.

View file

@ -14,7 +14,7 @@
*
* @param {string} data - The XML source stored in a string.
*
* @return {DOMParser|ActiveXObject|null} The parsed XML data, or `null` if the data could not be parsed.
* @return {?(DOMParser|ActiveXObject)} The parsed XML data, or `null` if the data could not be parsed.
*/
var ParseXML = function (data)
{

View file

@ -66,7 +66,7 @@ var EventEmitter = new Class({
*
* @method EventEmitter#eventNames
* @since 3.0.0
*
*
* @return {array}
*/
@ -75,20 +75,20 @@ var EventEmitter = new Class({
*
* @method EventEmitter#listeners
* @since 3.0.0
*
* @param {string|symbol} event - The event name.
*
*
* @param {(string|symbol)} event - The event name.
*
* @return {array} The registered listeners.
*/
/**
* Return the number of listeners listening to a given event.
*
*
* @method EventEmitter#listenerCount
* @since 3.0.0
*
* @param {string|symbol} event - The event name.
*
* @param {(string|symbol)} event - The event name.
*
* @return {number} The number of listeners.
*/
@ -97,9 +97,9 @@ var EventEmitter = new Class({
*
* @method EventEmitter#emit
* @since 3.0.0
*
* @param {string|symbol} event - The event name.
*
*
* @param {(string|symbol)} event - The event name.
*
* @return {boolean} `true` if the event had listeners, else `false`.
*/
@ -108,11 +108,11 @@ var EventEmitter = new Class({
*
* @method EventEmitter#on
* @since 3.0.0
*
* @param {string|symbol} event - The event name.
*
* @param {(string|symbol)} event - The event name.
* @param {function} fn - The listener function.
* @param {*} [context=this] - The context to invoke the listener with.
*
*
* @return {EventEmitter} `this`.
*/
@ -121,11 +121,11 @@ var EventEmitter = new Class({
*
* @method EventEmitter#addListener
* @since 3.0.0
*
* @param {string|symbol} event - The event name.
*
* @param {(string|symbol)} event - The event name.
* @param {function} fn - The listener function.
* @param {*} [context=this] - The context to invoke the listener with.
*
*
* @return {EventEmitter} `this`.
*/
@ -134,11 +134,11 @@ var EventEmitter = new Class({
*
* @method EventEmitter#once
* @since 3.0.0
*
* @param {string|symbol} event - The event name.
*
* @param {(string|symbol)} event - The event name.
* @param {function} fn - The listener function.
* @param {*} [context=this] - The context to invoke the listener with.
*
*
* @return {EventEmitter} `this`.
*/
@ -147,12 +147,12 @@ var EventEmitter = new Class({
*
* @method EventEmitter#removeListener
* @since 3.0.0
*
* @param {string|symbol} event - The event name.
*
* @param {(string|symbol)} event - The event name.
* @param {function} fn - Only remove the listeners that match this function.
* @param {*} context - Only remove the listeners that have this context.
* @param {boolean} once - Only remove one-time listeners.
*
*
* @return {EventEmitter} `this`.
*/
@ -161,12 +161,12 @@ var EventEmitter = new Class({
*
* @method EventEmitter#off
* @since 3.0.0
*
* @param {string|symbol} event - The event name.
*
* @param {(string|symbol)} event - The event name.
* @param {function} fn - Only remove the listeners that match this function.
* @param {*} context - Only remove the listeners that have this context.
* @param {boolean} once - Only remove one-time listeners.
*
*
* @return {EventEmitter} `this`.
*/
@ -175,9 +175,9 @@ var EventEmitter = new Class({
*
* @method EventEmitter#removeAllListeners
* @since 3.0.0
*
* @param {string|symbol} [event] - The event name.
*
*
* @param {(string|symbol)} [event] - The event name.
*
* @return {EventEmitter} `this`.
*/

View file

@ -211,7 +211,7 @@ var GameObject = new Class({
* @since 3.0.0
*
* @param {string} key - The key of the property to be stored.
* @param {any} value - The value to store with the key. Can be a string, number, array or object.
* @param {*} value - The value to store with the key. Can be a string, number, array or object.
*
* @return {Phaser.GameObjects.GameObject} This GameObject.
*/
@ -235,7 +235,7 @@ var GameObject = new Class({
*
* @param {string} key - The key of the property to be retrieved.
*
* @return {any} The data, if present in the Data Store.
* @return {*} The data, if present in the Data Store.
*/
getData: function (key)
{
@ -253,7 +253,7 @@ var GameObject = new Class({
* @method Phaser.GameObjects.GameObject#setInteractive
* @since 3.0.0
*
* @param {any} [shape] - A geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.
* @param {*} [shape] - A geometric shape that defines the hit area for the Game Object. If not specified a Rectangle will be used.
* @param {HitAreaCallback} [callback] - A callback to be invoked when the Game Object is interacted with.
* @param {boolean} [dropZone=false] - Should this Game Object be treated as a drop zone target?
*

View file

@ -10,8 +10,8 @@
* @function GetBitmapTextSize
* @since 3.0.0
* @private
*
* @param {Phaser.GameObjects.DynamicBitmapText|Phaser.GameObjects.BitmapText} src - [description]
*
* @param {(Phaser.GameObjects.DynamicBitmapText|Phaser.GameObjects.BitmapText)} src - [description]
* @param {boolean} round - [description]
*/
var GetBitmapTextSize = function (src, round)
@ -23,7 +23,7 @@ var GetBitmapTextSize = function (src, round)
var by = Number.MAX_VALUE;
var bw = 0;
var bh = 0;
var chars = src.fontData.chars;
var lineHeight = src.fontData.lineHeight;
@ -92,7 +92,7 @@ var GetBitmapTextSize = function (src, round)
{
bw = gw;
}
if (bh < gh)
{
bh = gh;

View file

@ -49,7 +49,7 @@ var Render = require('./DynamicBitmapTextRender');
* @param {number} [x=0] - The x coordinate of this Game Object in world space.
* @param {number} [y=0] - The y coordinate of this Game Object in world space.
* @param {string} font - [description]
* @param {string|string[]} [text] - [description]
* @param {(string|string[])} [text] - [description]
* @param {number} [size] - [description]
*/
var DynamicBitmapText = new Class({
@ -240,7 +240,7 @@ var DynamicBitmapText = new Class({
* @method Phaser.GameObjects.DynamicBitmapText#setText
* @since 3.0.0
*
* @param {string|string[]} value - The string, or array of strings, to be set as the content of this BitmapText.
* @param {(string|string[])} value - The string, or array of strings, to be set as the content of this BitmapText.
*
* @return {Phaser.GameObjects.DynamicBitmapText} This Game Object.
*/

View file

@ -18,9 +18,9 @@ var GameObjectFactory = require('../../GameObjectFactory');
* @param {number} x - The x position of the Game Object.
* @param {number} y - The y position of the Game Object.
* @param {string} font - [description]
* @param {string|string[]} [text] - [description]
* @param {(string|string[])} [text] - [description]
* @param {number} [size] - [description]
*
*
* @return {Phaser.GameObjects.DynamicBitmapText} The Game Object that was created.
*/
GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size)
@ -29,9 +29,9 @@ GameObjectFactory.register('dynamicBitmapText', function (x, y, font, text, size
});
// When registering a factory function 'this' refers to the GameObjectFactory context.
//
//
// There are several properties available to use:
//
//
// this.scene - a reference to the Scene that owns the GameObjectFactory
// this.displayList - a reference to the Display List the Scene owns
// this.updateList - a reference to the Update List the Scene owns

View file

@ -53,7 +53,7 @@ var Render = require('./BitmapTextRender');
* @param {number} [x=0] - The x coordinate of this Game Object in world space.
* @param {number} [y=0] - The y coordinate of this Game Object in world space.
* @param {string} font - [description]
* @param {string|string[]} [text] - [description]
* @param {(string|string[])} [text] - [description]
* @param {number} [size] - [description]
*/
var BitmapText = new Class({
@ -160,7 +160,7 @@ var BitmapText = new Class({
* @method Phaser.GameObjects.BitmapText#setText
* @since 3.0.0
*
* @param {string|string[]} value - The string, or array of strings, to be set as the content of this BitmapText.
* @param {(string|string[])} value - The string, or array of strings, to be set as the content of this BitmapText.
*
* @return {Phaser.GameObjects.BitmapText} This Game Object.
*/

View file

@ -18,9 +18,9 @@ var GameObjectFactory = require('../../GameObjectFactory');
* @param {number} x - The x position of the Game Object.
* @param {number} y - The y position of the Game Object.
* @param {string} font - [description]
* @param {string|string[]} [text] - [description]
* @param {(string|string[])} [text] - [description]
* @param {number} [size] - [description]
*
*
* @return {Phaser.GameObjects.BitmapText} The Game Object that was created.
*/
GameObjectFactory.register('bitmapText', function (x, y, font, text, size)
@ -29,9 +29,9 @@ GameObjectFactory.register('bitmapText', function (x, y, font, text, size)
});
// When registering a factory function 'this' refers to the GameObjectFactory context.
//
//
// There are several properties available to use:
//
//
// this.scene - a reference to the Scene that owns the GameObjectFactory
// this.displayList - a reference to the Display List the Scene owns
// this.updateList - a reference to the Update List the Scene owns

View file

@ -56,7 +56,7 @@ var List = require('../../structs/List');
* @param {number} [x=0] - The x coordinate of this Game Object in world space.
* @param {number} [y=0] - The y coordinate of this Game Object in world space.
* @param {string} [texture='__DEFAULT'] - The key of the texture this Game Object will use for rendering. The Texture must already exist in the Texture Manager.
* @param {string|integer} [frame=0] - The Frame of the Texture that this Game Object will use. Only set if the Texture has multiple frames, such as a Texture Atlas or Sprite Sheet.
* @param {(string|integer)} [frame=0] - The Frame of the Texture that this Game Object will use. Only set if the Texture has multiple frames, such as a Texture Atlas or Sprite Sheet.
*/
var Blitter = new Class({
@ -116,7 +116,7 @@ var Blitter = new Class({
*
* @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.
* @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.
* @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.
*

View file

@ -18,7 +18,7 @@ var GameObjectFactory = require('../GameObjectFactory');
* @param {number} x - The x position of the Game Object.
* @param {number} y - The y position of the Game Object.
* @param {string} key - The key of the Texture the Blitter object will use.
* @param {string|integer} [frame] - The default Frame children of the Blitter will use.
* @param {(string|integer)} [frame] - The default Frame children of the Blitter will use.
*
* @return {Phaser.GameObjects.Blitter} The Game Object that was created.
*/

View file

@ -30,7 +30,7 @@ var Class = require('../../utils/Class');
* @param {Phaser.GameObjects.Blitter} blitter - The parent Blitter object is responsible for updating this Bob.
* @param {number} x - The horizontal position of this Game Object in the world, relative to the parent Blitter position.
* @param {number} y - The vertical position of this Game Object in the world, relative to the parent Blitter position.
* @param {string|integer} frame - The Frame this Bob will render with, as defined in the Texture the parent Blitter is using.
* @param {(string|integer)} frame - The Frame this Bob will render with, as defined in the Texture the parent Blitter is using.
* @param {boolean} visible - Should the Bob render visible or not to start with?
*/
var Bob = new Class({
@ -70,7 +70,7 @@ var Bob = new Class({
* [description]
*
* @name Phaser.GameObjects.Blitter.Bob#frame
* @type {string|integer}
* @type {(string|integer)}
* @since 3.0.0
*/
this.frame = frame;

View file

@ -390,7 +390,7 @@ var Animation = new Class({
*
* @param {boolean} [value] - [description]
*
* @return {boolean|Phaser.GameObjects.GameObject} [description]
* @return {(boolean|Phaser.GameObjects.GameObject)} [description]
*/
paused: function (value)
{
@ -474,7 +474,7 @@ var Animation = new Class({
*
* @param {number} [value] - [description]
*
* @return {number|Phaser.GameObjects.GameObject} [description]
* @return {(number|Phaser.GameObjects.GameObject)} [description]
*/
progress: function (value)
{
@ -534,7 +534,7 @@ var Animation = new Class({
*
* @param {number} value - [description]
*
* @return {number|Phaser.GameObjects.GameObject} [description]
* @return {(number|Phaser.GameObjects.GameObject)} [description]
*/
repeat: function (value)
{
@ -562,7 +562,7 @@ var Animation = new Class({
*
* @param {number} [value] - [description]
*
* @return {number|Phaser.GameObjects.GameObject} [description]
* @return {(number|Phaser.GameObjects.GameObject)} [description]
*/
repeatDelay: function (value)
{
@ -666,7 +666,7 @@ var Animation = new Class({
*
* @param {number} [value] - [description]
*
* @return {number|Phaser.GameObjects.GameObject} [description]
* @return {(number|Phaser.GameObjects.GameObject)} [description]
*/
timeScale: function (value)
{
@ -779,7 +779,7 @@ var Animation = new Class({
*
* @param {boolean} [value] - [description]
*
* @return {boolean|Phaser.GameObjects.GameObject} [description]
* @return {(boolean|Phaser.GameObjects.GameObject)} [description]
*/
yoyo: function (value)
{

View file

@ -9,7 +9,7 @@ var BlendModes = require('../../renderer/BlendModes');
/**
* Provides methods used for setting the blend mode of a Game Object.
* Should be applied as a mixin and not used directly.
*
*
* @name Phaser.GameObjects.Components.BlendMode
* @since 3.0.0
*/
@ -20,11 +20,11 @@ var BlendMode = {
/**
* Sets the Blend Mode being used by this Game Object.
*
*
* This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
*
*
* Under WebGL only the following Blend Modes are available:
*
*
* * ADD
* * MULTIPLY
* * SCREEN
@ -37,9 +37,9 @@ var BlendMode = {
* on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
* reasons try to be careful about the construction of your Scene and the frequency of which blend modes
* are used.
*
*
* @name Phaser.GameObjects.Components.BlendMode#blendMode
* @type {integer|string}
* @type {(integer|string)}
* @since 3.0.0
*/
blendMode: {
@ -68,11 +68,11 @@ var BlendMode = {
/**
* Sets the Blend Mode being used by this Game Object.
*
*
* This can be a const, such as `Phaser.BlendModes.SCREEN`, or an integer, such as 4 (for Overlay)
*
*
* Under WebGL only the following Blend Modes are available:
*
*
* * ADD
* * MULTIPLY
* * SCREEN
@ -85,12 +85,12 @@ var BlendMode = {
* on support. Blend Modes also cause a WebGL batch flush should it encounter a new blend mode. For these
* reasons try to be careful about the construction of your Scene and the frequency of which blend modes
* are used.
*
*
* @method Phaser.GameObjects.Components.BlendMode#setBlendMode
* @since 3.0.0
*
* @param {string|integer} value - The BlendMode value. Either a string or a CONST.
*
* @param {(string|integer)} value - The BlendMode value. Either a string or a CONST.
*
* @return {Phaser.GameObjects.GameObject} This Game Object instance.
*/
setBlendMode: function (value)

View file

@ -11,7 +11,7 @@ var Vector2 = require('../../math/Vector2');
/**
* Provides methods used for obtaining the bounds of a Game Object.
* Should be applied as a mixin and not used directly.
*
*
* @name Phaser.GameObjects.Components.GetBounds
* @since 3.0.0
*/
@ -20,13 +20,13 @@ var GetBounds = {
/**
* Gets the center coordinate of this Game Object, regardless of origin.
*
*
* @method Phaser.GameObjects.Components.GetBounds#getCenter
* @since 3.0.0
*
* @param {Phaser.Math.Vector2|object} [output] - An object to store the values in. If not provided a new Vector2 will be created.
*
* @return {Phaser.Math.Vector2|object} The values stored in the output object.
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
*
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
*/
getCenter: function (output)
{
@ -40,13 +40,13 @@ var GetBounds = {
/**
* Gets the top-left corner coordinate of this Game Object, regardless of origin.
*
*
* @method Phaser.GameObjects.Components.GetBounds#getTopLeft
* @since 3.0.0
*
* @param {Phaser.Math.Vector2|object} [output] - An object to store the values in. If not provided a new Vector2 will be created.
*
* @return {Phaser.Math.Vector2|object} The values stored in the output object.
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
*
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
*/
getTopLeft: function (output)
{
@ -65,13 +65,13 @@ var GetBounds = {
/**
* Gets the top-right corner coordinate of this Game Object, regardless of origin.
*
*
* @method Phaser.GameObjects.Components.GetBounds#getTopRight
* @since 3.0.0
*
* @param {Phaser.Math.Vector2|object} [output] - An object to store the values in. If not provided a new Vector2 will be created.
*
* @return {Phaser.Math.Vector2|object} The values stored in the output object.
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
*
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
*/
getTopRight: function (output)
{
@ -90,13 +90,13 @@ var GetBounds = {
/**
* Gets the bottom-left corner coordinate of this Game Object, regardless of origin.
*
*
* @method Phaser.GameObjects.Components.GetBounds#getBottomLeft
* @since 3.0.0
*
* @param {Phaser.Math.Vector2|object} [output] - An object to store the values in. If not provided a new Vector2 will be created.
*
* @return {Phaser.Math.Vector2|object} The values stored in the output object.
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
*
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
*/
getBottomLeft: function (output)
{
@ -115,13 +115,13 @@ var GetBounds = {
/**
* Gets the bottom-right corner coordinate of this Game Object, regardless of origin.
*
*
* @method Phaser.GameObjects.Components.GetBounds#getBottomRight
* @since 3.0.0
*
* @param {Phaser.Math.Vector2|object} [output] - An object to store the values in. If not provided a new Vector2 will be created.
*
* @return {Phaser.Math.Vector2|object} The values stored in the output object.
* @param {(Phaser.Math.Vector2|object)} [output] - An object to store the values in. If not provided a new Vector2 will be created.
*
* @return {(Phaser.Math.Vector2|object)} The values stored in the output object.
*/
getBottomRight: function (output)
{
@ -141,13 +141,13 @@ var GetBounds = {
/**
* Gets the bounds of this Game Object, regardless of origin.
* The values are stored and returned in a Rectangle, or Rectangle-like, object.
*
*
* @method Phaser.GameObjects.Components.GetBounds#getBounds
* @since 3.0.0
*
* @param {Phaser.Geom.Rectangle|object} [output] - An object to store the values in. If not provided a new Rectangle will be created.
*
* @return {Phaser.Geom.Rectangle|object} The values stored in the output object.
* @param {(Phaser.Geom.Rectangle|object)} [output] - An object to store the values in. If not provided a new Rectangle will be created.
*
* @return {(Phaser.Geom.Rectangle|object)} The values stored in the output object.
*/
getBounds: function (output)
{

View file

@ -9,7 +9,7 @@ var _FLAG = 8; // 1000
/**
* Provides methods used for getting and setting the texture of a Game Object.
*
*
* @name Phaser.GameObjects.Components.Texture
* @since 3.0.0
*/
@ -18,7 +18,7 @@ var Texture = {
/**
* The Texture this Game Object is using to render with.
*
*
* @name Phaser.GameObjects.Components.Texture#texture
* @type {Phaser.Textures.Texture}
* @since 3.0.0
@ -27,7 +27,7 @@ var Texture = {
/**
* The Texture Frame this Game Object is using to render with.
*
*
* @name Phaser.GameObjects.Components.Texture#frame
* @type {Phaser.Textures.Frame}
* @since 3.0.0
@ -38,13 +38,13 @@ var Texture = {
* Sets the texture and frame this Game Object will use to render with.
*
* Textures are referenced by their string-based keys, as stored in the Texture Manager.
*
*
* @method Phaser.GameObjects.Components.Texture#setTexture
* @since 3.0.0
*
* @param {string} key - The key of the texture to be used, as stored in the Texture Manager.
* @param {string|integer} [frame] - The name or index of the frame within the Texture.
*
* @param {(string|integer)} [frame] - The name or index of the frame within the Texture.
*
* @return {Phaser.GameObjects.GameObject} This Game Object instance.
*/
setTexture: function (key, frame)
@ -63,14 +63,14 @@ var Texture = {
*
* Calling `setFrame` will modify the `width` and `height` properties of your Game Object.
* It will also change the `origin` if the Frame has a custom pivot point, as exported from packages like Texture Packer.
*
*
* @method Phaser.GameObjects.Components.Texture#setFrame
* @since 3.0.0
*
* @param {string|integer} frame - The name or index of the frame within the Texture.
* @param {(string|integer)} frame - The name or index of the frame within the Texture.
* @param {boolean} [updateSize=true] - Should this call adjust the size of the Game Object?
* @param {boolean} [updateOrigin=true] - Should this call adjust the origin of the Game Object?
*
*
* @return {Phaser.GameObjects.GameObject} This Game Object instance.
*/
setFrame: function (frame, updateSize, updateOrigin)

View file

@ -23,7 +23,7 @@
* @property {float} alpha - The alpha value of the Game Object.
* @property {boolean} visible - The visible state of the Game Object.
* @property {integer} scaleMode - The Scale Mode being used by this Game Object.
* @property {integer|string} blendMode - Sets the Blend Mode being used by this Game Object.
* @property {(integer|string)} blendMode - Sets the Blend Mode being used by this Game Object.
* @property {string} textureKey - The texture key of this Game Object.
* @property {string} frameKey - The frame key of this Game Object.
* @property {object} data - The data of this Game Object.

View file

@ -71,7 +71,7 @@ var TransformMatrix = new Class({
loadIdentity: function ()
{
var matrix = this.matrix;
matrix[0] = 1;
matrix[1] = 0;
matrix[2] = 0;
@ -227,9 +227,9 @@ var TransformMatrix = new Class({
*
* @param {number} x - [description]
* @param {number} y - [description]
* @param {Phaser.Geom.Point|Phaser.Math.Vec2|object} point - [description]
* @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - [description]
*
* @return {Phaser.Geom.Point|Phaser.Math.Vec2|object} [description]
* @return {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} [description]
*/
transformPoint: function (x, y, point)
{

View file

@ -0,0 +1,175 @@
var Class = require('../../utils/Class');
var Node = new Class({
initialize:
function Node(owner)
{
this.next = this;
this.prev = this;
this.head = this;
this.owner = owner;
},
selfRemove: function ()
{
this.prev.next = this.next;
this.next.prev = this.prev;
this.next = this;
this.prev = this;
this.head = this;
return this;
},
getCount: function ()
{
var count = 0;
var head = this.head;
var node = head.next;
for (;node != head; node = node.next)
{
count += 1;
}
return count;
},
clear: function ()
{
if (this.head != this)
{
while (this.next != this)
{
next.selfRemove();
}
}
else
{
this.selfRemove();
}
return this;
},
insertBefore: function (target)
{
this.selfRemove();
this.next = target;
this.prev = target.prev;
target.prev = this;
this.prev.next = this;
this.head = target.head;
return this;
},
insertAfter: function (target)
{
this.selfRemove();
this.prev = target;
this.next = target.next;
target.next = this;
this.next.prev = this;
this.head = target.head;
return this;
},
insertBack: function (target)
{
return this.insertAfter(target.head);
},
insertFront: function (target)
{
return this.insertBefore(target.head);
},
getTail: function ()
{
return this.head.prev;
}
});
var TransformData = new Class({
initialize:
function TransformData()
{
this.x = 0.0;
this.y = 0.0;
this.scaleX = 1.0;
this.scaleY = 1.0;
this.rotation = 0.0;
}
});
var TransformNode = new Class({
initialize:
function TransformNode(object)
{
this.object = object;
this.parent = new Node(this);
this.children = new Node(this);
this.localTransform = new TransformData();
this.worldTransform = new TransformData();
},
setParent: function (parent)
{
this.parent.insertFront(parent.children);
return this;
},
add: function (child)
{
child.setParent(this);
return this;
},
removeParent: function ()
{
this.parent.selfRemove();
return this;
},
remove: function (child)
{
child.removeParent();
return this;
},
clearChildren: function ()
{
this.children.clear();
return this;
},
getParentNode: function ()
{
return this.parent.head.owner;
},
getRootNode: function ()
{
if (this.parent.head.owner.parent.head.owner === this)
{
return this;
}
else
{
return this.parent.head.owner.getRootNode();
}
},
getChildCount: function ()
{
return this.children.getCount();
}
});
module.exports = TransformNode;

View file

@ -477,7 +477,7 @@ var Graphics = new Class({
* @method Phaser.GameObjects.Graphics#fillPointShape
* @since 3.0.0
*
* @param {Phaser.Geom.Point|Phaser.Math.Vector2|object} point - [description]
* @param {(Phaser.Geom.Point|Phaser.Math.Vector2|object)} point - [description]
* @param {number} [size=1] - [description]
*
* @return {Phaser.GameObjects.Graphics} This Game Object.
@ -731,7 +731,7 @@ var Graphics = new Class({
* @method Phaser.GameObjects.Graphics#strokePoints
* @since 3.0.0
*
* @param {array|Phaser.Geom.Point[]} points - [description]
* @param {(array|Phaser.Geom.Point[])} points - [description]
* @param {boolean} [autoClose=false] - [description]
* @param {integer} [endIndex] - [description]
*
@ -767,7 +767,7 @@ var Graphics = new Class({
* @method Phaser.GameObjects.Graphics#fillPoints
* @since 3.0.0
*
* @param {array|Phaser.Geom.Point[]} points - [description]
* @param {(array|Phaser.Geom.Point[])} points - [description]
* @param {boolean} [autoClose=false] - [description]
* @param {integer} [endIndex] - [description]
*
@ -1043,7 +1043,7 @@ var Graphics = new Class({
* @method Phaser.GameObjects.Graphics#generateTexture
* @since 3.0.0
*
* @param {string|HTMLCanvasElement} key - [description]
* @param {(string|HTMLCanvasElement)} key - [description]
* @param {integer} [width] - [description]
* @param {integer} [height] - [description]
*

View file

@ -108,7 +108,7 @@ var Group = new Class({
* [description]
*
* @name Phaser.GameObjects.Group#defaultFrame
* @type {string|integer}
* @type {(string|integer)}
* @since 3.0.0
*/
this.defaultFrame = GetFastValue(config, 'defaultFrame', null);
@ -165,8 +165,8 @@ var Group = new Class({
* @param {number} x - The horizontal position of this Game Object in the world.
* @param {number} y - The vertical position of this Game Object in the world.
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {boolean} [visible=true] - The {@link Phaser.GameObjects.Components.Visible#visible} state of this Game Object.
* @param {boolean} [active=true] - The {@link Phaser.GameObjects.GameObject#active} state of this Game Object.
*
@ -454,6 +454,11 @@ var Group = new Class({
this.children.delete(child);
if (this.removeCallback)
{
this.removeCallback.call(this, child);
}
if (removeFromScene)
{
this.scene.sys.displayList.remove(child);
@ -559,10 +564,10 @@ var Group = new Class({
* @param {number} [x] - The horizontal position of this Game Object in the world.
* @param {number} [y] - The vertical position of this Game Object in the world.
* @param {string} [texture] - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {boolean} [visible] - [description]
*
* @return {Phaser.GameObjects.GameObject|null} [description]
* @return {?Phaser.GameObjects.GameObject} [description]
*/
getFirst: function (state, createIfNull, x, y, key, frame, visible)
{
@ -613,7 +618,7 @@ var Group = new Class({
* @param {number} x - The horizontal position of this Game Object in the world.
* @param {number} y - The vertical position of this Game Object in the world.
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {boolean} visible - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
@ -633,7 +638,7 @@ var Group = new Class({
* @param {number} x - The horizontal position of this Game Object in the world.
* @param {number} y - The vertical position of this Game Object in the world.
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {boolean} visible - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]
@ -653,7 +658,7 @@ var Group = new Class({
* @param {number} x - The horizontal position of this Game Object in the world.
* @param {number} y - The vertical position of this Game Object in the world.
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {boolean} visible - [description]
*
* @return {Phaser.GameObjects.GameObject} [description]

View file

@ -15,9 +15,9 @@ var GameObjectFactory = require('../GameObjectFactory');
* @method Phaser.GameObjects.GameObjectFactory#group
* @since 3.0.0
*
* @param {array|object} children - [description]
* @param {(array|object)} children - [description]
* @param {object} [config] - [description]
*
*
* @return {Phaser.GameObjects.Group} The Game Object that was created.
*/
GameObjectFactory.register('group', function (children, config)
@ -32,9 +32,9 @@ GameObjectFactory.register('group', function (children, config)
});
// When registering a factory function 'this' refers to the GameObjectFactory context.
//
//
// There are several properties available to use:
//
//
// this.scene - a reference to the Scene that owns the GameObjectFactory
// this.displayList - a reference to the Display List the Scene owns
// this.updateList - a reference to the Update List the Scene owns

View file

@ -12,7 +12,7 @@ var ImageRender = require('./ImageRender');
/**
* @classdesc
* An Image Game Object.
*
*
* An Image is a light-weight Game Object useful for the display of static images in your game,
* such as logos, backgrounds, scenery or other non-animated elements. Images can have input
* events and physics bodies, or be tweened, tinted or scrolled. The main difference between an
@ -43,7 +43,7 @@ var ImageRender = require('./ImageRender');
* @param {number} x - The horizontal position of this Game Object in the world.
* @param {number} y - The vertical position of this Game Object in the world.
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
*/
var Image = new Class({

View file

@ -18,8 +18,8 @@ var GameObjectFactory = require('../GameObjectFactory');
* @param {number} x - The horizontal position of this Game Object in the world.
* @param {number} y - The vertical position of this Game Object in the world.
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with.
*
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
*
* @return {Phaser.GameObjects.Image} The Game Object that was created.
*/
GameObjectFactory.register('image', function (x, y, key, frame)
@ -28,9 +28,9 @@ GameObjectFactory.register('image', function (x, y, key, frame)
});
// When registering a factory function 'this' refers to the GameObjectFactory context.
//
//
// There are several properties available to use:
//
//
// this.scene - a reference to the Scene that owns the GameObjectFactory
// this.displayList - a reference to the Display List the Scene owns
// this.updateList - a reference to the Update List the Scene owns

View file

@ -42,7 +42,7 @@ var MeshRender = require('./MeshRender');
* @param {array} colors - An array containing the color data for this Mesh.
* @param {array} alphas - An array containing the alpha data for this Mesh.
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
*/
var Mesh = new Class({

View file

@ -23,7 +23,7 @@ var GameObjectFactory = require('../GameObjectFactory');
* @param {array} colors - An array containing the color data for this Mesh.
* @param {array} alphas - An array containing the alpha data for this Mesh.
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {string|integer} [frame] - An optional frame from the Texture this Game Object is rendering with.
* @param {(string|integer)} [frame] - An optional frame from the Texture this Game Object is rendering with.
*
* @return {Phaser.GameObjects.Mesh} The Game Object that was created.
*/

View file

@ -16,7 +16,7 @@ var GetFastValue = require('../../utils/object/GetFastValue');
* @constructor
* @since 3.0.0
*
* @param {number|object} [x=0] - The x coordinate of the Gravity Well, in world space.
* @param {(number|object)} [x=0] - The x coordinate of the Gravity Well, in world space.
* @param {number} [y=0] - The y coordinate of the Gravity Well, in world space.
* @param {number} [power=0] - The power of the Gravity Well.
* @param {number} [epsilon=100] - [description]

View file

@ -423,7 +423,7 @@ var ParticleEmitter = new Class({
* [description]
*
* @name Phaser.GameObjects.Particles.ParticleEmitter#emitCallbackScope
* @type {?any}
* @type {?*}
* @default null
* @since 3.0.0
*/
@ -443,7 +443,7 @@ var ParticleEmitter = new Class({
* [description]
*
* @name Phaser.GameObjects.Particles.ParticleEmitter#deathCallbackScope
* @type {?any}
* @type {?*}
* @default null
* @since 3.0.0
*/
@ -973,7 +973,7 @@ var ParticleEmitter = new Class({
* @method Phaser.GameObjects.Particles.ParticleEmitter#setFrame
* @since 3.0.0
*
* @param {array|string|integer|object} frames - [description]
* @param {(array|string|integer|object)} frames - [description]
* @param {boolean} [pickRandom=true] - [description]
* @param {integer} [quantity=1] - [description]
*
@ -1068,7 +1068,7 @@ var ParticleEmitter = new Class({
* @method Phaser.GameObjects.Particles.ParticleEmitter#setBounds
* @since 3.0.0
*
* @param {number|object} x - [description]
* @param {(number|object)} x - [description]
* @param {number} y - [description]
* @param {number} width - [description]
* @param {number} height - [description]
@ -1548,7 +1548,7 @@ var ParticleEmitter = new Class({
* @since 3.0.0
*
* @param {ParticleEmitterCallback} callback - [description]
* @param {any} [context] - [description]
* @param {*} [context] - [description]
*
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
*/
@ -1580,7 +1580,7 @@ var ParticleEmitter = new Class({
* @since 3.0.0
*
* @param {ParticleDeathCallback} callback - [description]
* @param {any} [context] - [description]
* @param {*} [context] - [description]
*
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
*/
@ -1633,7 +1633,7 @@ var ParticleEmitter = new Class({
* @since 3.0.0
*
* @param {ParticleEmitterCallback} callback - [description]
* @param {any} thisArg - [description]
* @param {*} thisArg - [description]
*
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
*/
@ -1658,7 +1658,7 @@ var ParticleEmitter = new Class({
* @since 3.0.0
*
* @param {ParticleEmitterCallback} callback - [description]
* @param {any} thisArg - [description]
* @param {*} thisArg - [description]
*
* @return {Phaser.GameObjects.Particles.ParticleEmitter} This Particle Emitter.
*/

View file

@ -28,7 +28,7 @@ var Render = require('./ParticleManagerRender');
*
* @param {Phaser.Scene} scene - [description]
* @param {string} texture - [description]
* @param {string|integer} frame - [description]
* @param {(string|integer)} frame - [description]
* @param {Phaser.GameObjects.Particles.ParticleEmitter[]} emitters - [description]
*/
var ParticleEmitterManager = new Class({
@ -152,7 +152,7 @@ var ParticleEmitterManager = new Class({
* @since 3.0.0
*
* @param {string} key - The key of the texture to be used, as stored in the Texture Manager.
* @param {string|integer} [frame] - The name or index of the frame within the Texture.
* @param {(string|integer)} [frame] - The name or index of the frame within the Texture.
*
* @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Game Object.
*/
@ -173,7 +173,7 @@ var ParticleEmitterManager = new Class({
* @method Phaser.GameObjects.Particles.ParticleEmitterManager#setFrame
* @since 3.0.0
*
* @param {string|integer} [frame] - The name or index of the frame within the Texture.
* @param {(string|integer)} [frame] - The name or index of the frame within the Texture.
*
* @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Game Object.
*/
@ -194,7 +194,7 @@ var ParticleEmitterManager = new Class({
* @method Phaser.GameObjects.Particles.ParticleEmitterManager#setEmitterFrames
* @since 3.0.0
*
* @param {Phaser.Textures.Frame|Phaser.Textures.Frame[]} frames - [description]
* @param {(Phaser.Textures.Frame|Phaser.Textures.Frame[])} frames - [description]
* @param {Phaser.GameObjects.Particles.ParticleEmitter} emitter - [description]
*
* @return {Phaser.GameObjects.Particles.ParticleEmitterManager} This Game Object.

View file

@ -16,25 +16,25 @@ var ParticleEmitterManager = require('./ParticleEmitterManager');
* @since 3.0.0
*
* @param {string} texture - The key of the Texture this Game Object will use to render with, as stored in the Texture Manager.
* @param {string|integer|object} [frame] - [description]
* @param {(string|integer|object)} [frame] - [description]
* @param {object} [emitters] - [description]
*
*
* @return {Phaser.GameObjects.Particles.ParticleEmitterManager} The Game Object that was created.
*/
GameObjectFactory.register('particles', function (key, frame, emitters)
{
var manager = new ParticleEmitterManager(this.scene, key, frame, emitters);
this.displayList.add(manager);
this.updateList.add(manager);
return manager;
});
// When registering a factory function 'this' refers to the GameObjectFactory context.
//
//
// There are several properties available to use:
//
//
// this.scene - a reference to the Scene that owns the GameObjectFactory
// this.displayList - a reference to the Display List the Scene owns
// this.updateList - a reference to the Update List the Scene owns

Some files were not shown because too many files have changed in this diff Show more