Fix multiple types on GameObjects

This commit is contained in:
orblazer 2018-03-20 15:56:31 +01:00
parent 4cff464555
commit 87633fdfad
39 changed files with 171 additions and 171 deletions

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

@ -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.
*
@ -559,7 +559,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]
@ -613,7 +613,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 +633,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 +653,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

@ -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]

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

View file

@ -36,7 +36,7 @@ var Vector2 = require('../../math/Vector2');
* @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 PathFollower = new Class({

View file

@ -19,8 +19,8 @@ var PathFollower = require('./PathFollower');
* @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.PathFollower} The Game Object that was created.
*/
GameObjectFactory.register('follower', function (path, x, y, key, frame)
@ -34,9 +34,9 @@ GameObjectFactory.register('follower', function (path, 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

@ -13,7 +13,7 @@ var Mesh = require('../mesh/Mesh');
*
* A Quad is a Mesh Game Object pre-configured with two triangles arranged into a rectangle, with a single
* texture spread across them.
*
*
* You can manipulate the corner points of the quad via the getters and setters such as `topLeftX`, and also
* change their alpha and color values. The quad itself can be moved by adjusting the `x` and `y` properties.
*
@ -28,7 +28,7 @@ var Mesh = require('../mesh/Mesh');
* @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 Quad = new Class({
@ -47,7 +47,7 @@ var Quad = new Class({
// 1----2
var vertices = [
0, 0, // tl
0, 0, // tl
0, 0, // bl
0, 0, // br
0, 0, // tl
@ -86,7 +86,7 @@ var Quad = new Class({
/**
* The top-left x vertex of this Quad.
*
*
* @name Phaser.GameObjects.Quad#topLeftX
* @type {number}
* @since 3.0.0
@ -108,7 +108,7 @@ var Quad = new Class({
/**
* The top-left y vertex of this Quad.
*
*
* @name Phaser.GameObjects.Quad#topLeftY
* @type {number}
* @since 3.0.0
@ -130,7 +130,7 @@ var Quad = new Class({
/**
* The top-right x vertex of this Quad.
*
*
* @name Phaser.GameObjects.Quad#topRightX
* @type {number}
* @since 3.0.0
@ -151,7 +151,7 @@ var Quad = new Class({
/**
* The top-right y vertex of this Quad.
*
*
* @name Phaser.GameObjects.Quad#topRightY
* @type {number}
* @since 3.0.0
@ -172,7 +172,7 @@ var Quad = new Class({
/**
* The bottom-left x vertex of this Quad.
*
*
* @name Phaser.GameObjects.Quad#bottomLeftX
* @type {number}
* @since 3.0.0
@ -193,7 +193,7 @@ var Quad = new Class({
/**
* The bottom-left y vertex of this Quad.
*
*
* @name Phaser.GameObjects.Quad#bottomLeftY
* @type {number}
* @since 3.0.0
@ -214,7 +214,7 @@ var Quad = new Class({
/**
* The bottom-right x vertex of this Quad.
*
*
* @name Phaser.GameObjects.Quad#bottomRightX
* @type {number}
* @since 3.0.0
@ -236,7 +236,7 @@ var Quad = new Class({
/**
* The bottom-right y vertex of this Quad.
*
*
* @name Phaser.GameObjects.Quad#bottomRightY
* @type {number}
* @since 3.0.0
@ -258,7 +258,7 @@ var Quad = new Class({
/**
* The top-left alpha value of this Quad.
*
*
* @name Phaser.GameObjects.Quad#topLeftAlpha
* @type {float}
* @since 3.0.0
@ -280,7 +280,7 @@ var Quad = new Class({
/**
* The top-right alpha value of this Quad.
*
*
* @name Phaser.GameObjects.Quad#topRightAlpha
* @type {float}
* @since 3.0.0
@ -301,7 +301,7 @@ var Quad = new Class({
/**
* The bottom-left alpha value of this Quad.
*
*
* @name Phaser.GameObjects.Quad#bottomLeftAlpha
* @type {float}
* @since 3.0.0
@ -322,7 +322,7 @@ var Quad = new Class({
/**
* The bottom-right alpha value of this Quad.
*
*
* @name Phaser.GameObjects.Quad#bottomRightAlpha
* @type {float}
* @since 3.0.0
@ -344,7 +344,7 @@ var Quad = new Class({
/**
* The top-left color value of this Quad.
*
*
* @name Phaser.GameObjects.Quad#topLeftColor
* @type {number}
* @since 3.0.0
@ -366,7 +366,7 @@ var Quad = new Class({
/**
* The top-right color value of this Quad.
*
*
* @name Phaser.GameObjects.Quad#topRightColor
* @type {number}
* @since 3.0.0
@ -387,7 +387,7 @@ var Quad = new Class({
/**
* The bottom-left color value of this Quad.
*
*
* @name Phaser.GameObjects.Quad#bottomLeftColor
* @type {number}
* @since 3.0.0
@ -408,7 +408,7 @@ var Quad = new Class({
/**
* The bottom-right color value of this Quad.
*
*
* @name Phaser.GameObjects.Quad#bottomRightColor
* @type {number}
* @since 3.0.0

View file

@ -19,7 +19,7 @@ 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.Quad} The Game Object that was created.
*/

View file

@ -80,7 +80,7 @@ var RenderTexture = new Class({
this.renderer = scene.sys.game.renderer;
this.globalTint = 0xffffff;
this.globalAlpha = 1.0;
if (this.renderer.type === CONST.WEBGL)
{
var gl = this.renderer.gl;
@ -183,7 +183,7 @@ var RenderTexture = new Class({
* @since 3.2.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} [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 {number} x - The x position to draw the frame at.
* @param {number} y - The y position to draw the frame at.
*

View file

@ -47,7 +47,7 @@ var SpriteRender = require('./SpriteRender');
* @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 Sprite = new Class({
@ -115,7 +115,7 @@ var Sprite = new Class({
*
* @param {string} key - [description]
* @param {boolean} ignoreIfPlaying - [description]
* @param {integer|string} startFrame - [description]
* @param {(integer|string)} startFrame - [description]
*
* @return {Phaser.GameObjects.Sprite} This Game Object.
*/

View file

@ -18,8 +18,8 @@ var Sprite = require('./Sprite');
* @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.Sprite} The Game Object that was created.
*/
GameObjectFactory.register('sprite', function (x, y, key, frame)
@ -33,9 +33,9 @@ GameObjectFactory.register('sprite', 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

@ -28,7 +28,7 @@ var Vector4 = require('../../math/Vector4');
* @param {number} y - The y position of this Game Object.
* @param {number} z - The z position of this Game Object.
* @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 Sprite3D = new Class({
@ -170,9 +170,9 @@ var Sprite3D = new Class({
/**
* The visible state of the Game Object.
*
*
* An invisible Game Object will skip rendering, but will still process update logic.
*
*
* @name Phaser.GameObjects.Sprite3D#visible
* @type {boolean}
* @since 3.0.0
@ -194,7 +194,7 @@ var Sprite3D = new Class({
/**
* The x position of this Game Object.
*
*
* @name Phaser.GameObjects.Sprite3D#x
* @type {number}
* @since 3.0.0
@ -215,7 +215,7 @@ var Sprite3D = new Class({
/**
* The y position of this Game Object.
*
*
* @name Phaser.GameObjects.Sprite3D#y
* @type {number}
* @since 3.0.0
@ -236,7 +236,7 @@ var Sprite3D = new Class({
/**
* The z position of this Game Object.
*
*
* @name Phaser.GameObjects.Sprite3D#z
* @type {number}
* @since 3.0.0

View file

@ -19,8 +19,8 @@ var GameObjectFactory = require('../GameObjectFactory');
* @param {number} y - The vertical position of this Game Object.
* @param {number} z - The z position of this Game Object.
* @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.Sprite3D} The Game Object that was created.
*/
GameObjectFactory.register('sprite3D', function (x, y, z, key, frame)
@ -34,9 +34,9 @@ GameObjectFactory.register('sprite3D', function (x, y, z, 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

@ -470,7 +470,7 @@ var TextStyle = new Class({
* @method Phaser.GameObjects.Components.TextStyle#setFont
* @since 3.0.0
*
* @param {string|object} font - [description]
* @param {(string|object)} font - [description]
*
* @return {Phaser.GameObjects.Text} The parent Text object.
*/
@ -532,7 +532,7 @@ var TextStyle = new Class({
* @method Phaser.GameObjects.Components.TextStyle#setFontSize
* @since 3.0.0
*
* @param {number|string} size - [description]
* @param {(number|string)} size - [description]
*
* @return {Phaser.GameObjects.Text} The parent Text object.
*/

View file

@ -42,7 +42,7 @@ var TextStyle = require('../TextStyle');
* @param {Phaser.Scene} scene - The Scene to which this Game Object belongs. A Game Object can only belong to one Scene at a time.
* @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|string[]} text - The text this Text object will display.
* @param {(string|string[])} text - The text this Text object will display.
* @param {object} style - The text style configuration object.
*/
var Text = new Class({
@ -499,7 +499,7 @@ var Text = new Class({
* @method Phaser.GameObjects.Text#setText
* @since 3.0.0
*
* @param {string|string[]} value - The string, or array of strings, to be set as the content of this Text object.
* @param {(string|string[])} value - The string, or array of strings, to be set as the content of this Text object.
*
* @return {Phaser.GameObjects.Text} This Text object.
*/
@ -832,7 +832,7 @@ var Text = new Class({
* @method Phaser.GameObjects.Text#setPadding
* @since 3.0.0
*
* @param {number|object} left - [description]
* @param {(number|object)} left - [description]
* @param {number} top - [description]
* @param {number} right - [description]
* @param {number} bottom - [description]

View file

@ -17,9 +17,9 @@ 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|string[]} text - The text this Text object will display.
* @param {(string|string[])} text - The text this Text object will display.
* @param {object} [style] - The Text style configuration object.
*
*
* @return {Phaser.GameObjects.Text} The Game Object that was created.
*/
GameObjectFactory.register('text', function (x, y, text, style)
@ -28,9 +28,9 @@ GameObjectFactory.register('text', function (x, y, text, style)
});
// 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

@ -43,7 +43,7 @@ var TileSpriteRender = require('./TileSpriteRender');
* @param {number} width - The width of the Game Object.
* @param {number} height - The height of the Game Object.
* @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 TileSprite = new Class({
@ -119,7 +119,7 @@ var TileSprite = new Class({
* [description]
*
* @name Phaser.GameObjects.TileSprite#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 = renderer;

View file

@ -20,8 +20,8 @@ var GameObjectFactory = require('../GameObjectFactory');
* @param {number} width - The width of the Game Object.
* @param {number} height - The height of the Game Object.
* @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.TileSprite} The Game Object that was created.
*/
GameObjectFactory.register('tileSprite', function (x, y, width, height, key, frame)
@ -30,9 +30,9 @@ GameObjectFactory.register('tileSprite', function (x, y, width, height, key, fra
});
// 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