diff --git a/tasks/buildtsdoc.js b/tasks/buildtsdoc.js index 6adcb6550..134e994c0 100644 --- a/tasks/buildtsdoc.js +++ b/tasks/buildtsdoc.js @@ -121,7 +121,15 @@ var TypeScriptDocGenerator = (function () { if ((p.default != null) && (p.default !== "")) { def = " - Default: " + p.default; } - comments.push("@param " + p.name + " - " + p.description + def); + var paramComments = p.description.split("\n"); + for (var k = 0; k < paramComments.length; k++) { + if (k === 0) { + comments.push("@param " + p.name + " " + paramComments[k].trim() + ((k === paramComments.length - 1) ? def : "")); + } + else { + comments.push(this.repeatSpaces(("@param " + p.name + " ").length) + paramComments[k].trim() + ((k === paramComments.length - 1) ? def : "")); + } + } } return comments; } @@ -149,10 +157,23 @@ var TypeScriptDocGenerator = (function () { if ((p.default != null) && (p.default !== "")) { def = " - Default: " + p.default; } - comments.push("@param " + p.name + " - " + p.description + def); + + var paramComments = p.description.split("\n"); + for (var k = 0; k < paramComments.length; k++) + { + if (k === 0) + { + comments.push("@param " + p.name + " " + paramComments[k].trim() + ((k === paramComments.length - 1) ? def : "")); + } + else + { + comments.push(this.repeatSpaces(("@param " + p.name + " ").length) + paramComments[k].trim() + ((k === paramComments.length - 1) ? def : "")); + } + } + } if (f.returns != null) { - comments.push("@return - " + f.returns.description); + comments.push("@return " + f.returns.description); } return comments; } diff --git a/typescript/phaser.comments.d.ts b/typescript/phaser.comments.d.ts index 39b45ac12..d67cbfa83 100644 --- a/typescript/phaser.comments.d.ts +++ b/typescript/phaser.comments.d.ts @@ -58,14 +58,14 @@ declare module Phaser { * An Animation instance contains a single animation and the controls to play it. * It is created by the AnimationManager, consists of Animation.Frame objects and belongs to a single Game Object such as a Sprite. * - * @param game - A reference to the currently running game. - * @param parent - A reference to the owner of this Animation. - * @param name - The unique name for this animation, used in playback commands. - * @param frameData - The FrameData object that contains all frames used by this Animation. - * @param frames - An array of numbers or strings indicating which frames to play in which order. - * @param frameRate - The speed at which the animation should play. The speed is given in frames per second. - Default: 60 - * @param loop - Whether or not the animation is looped or just plays once. - Default: false - * @param loop - Should this animation loop when it reaches the end or play through once. + * @param game A reference to the currently running game. + * @param parent A reference to the owner of this Animation. + * @param name The unique name for this animation, used in playback commands. + * @param frameData The FrameData object that contains all frames used by this Animation. + * @param frames An array of numbers or strings indicating which frames to play in which order. + * @param frameRate The speed at which the animation should play. The speed is given in frames per second. - Default: 60 + * @param loop Whether or not the animation is looped or just plays once. - Default: false + * @param loop Should this animation loop when it reaches the end or play through once. */ constructor(game: Phaser.Game, parent: Phaser.Sprite, name: string, frameData: Phaser.FrameData, frames: any[], frameRate?: number, loop?: boolean); @@ -188,19 +188,19 @@ declare module Phaser { * For example imagine you've got 30 frames named: 'explosion_0001-large' to 'explosion_0030-large' * You could use this function to generate those by doing: Phaser.Animation.generateFrameNames('explosion_', 1, 30, '-large', 4); * - * @param prefix - The start of the filename. If the filename was 'explosion_0001-large' the prefix would be 'explosion_'. - * @param start - The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the start is 1. - * @param stop - The number to count to. If your frames are named 'explosion_0001' to 'explosion_0034' the stop value is 34. - * @param suffix - The end of the filename. If the filename was 'explosion_0001-large' the prefix would be '-large'. - Default: '' - * @param zeroPad - The number of zeroes to pad the min and max values with. If your frames are named 'explosion_0001' to 'explosion_0034' then the zeroPad is 4. - Default: 0 - * @return - An array of framenames. + * @param prefix The start of the filename. If the filename was 'explosion_0001-large' the prefix would be 'explosion_'. + * @param start The number to start sequentially counting from. If your frames are named 'explosion_0001' to 'explosion_0034' the start is 1. + * @param stop The number to count to. If your frames are named 'explosion_0001' to 'explosion_0034' the stop value is 34. + * @param suffix The end of the filename. If the filename was 'explosion_0001-large' the prefix would be '-large'. - Default: '' + * @param zeroPad The number of zeroes to pad the min and max values with. If your frames are named 'explosion_0001' to 'explosion_0034' then the zeroPad is 4. - Default: 0 + * @return An array of framenames. */ static generateFrameNames(prefix: string, start: number, stop: number, suffix?: string, zeroPad?: number): string[]; /** * Advances by the given number of frames in the Animation, taking the loop value into consideration. * - * @param quantity - The number of frames to advance. - Default: 1 + * @param quantity The number of frames to advance. - Default: 1 */ next(quantity?: number): void; @@ -217,17 +217,17 @@ declare module Phaser { /** * Plays this animation. * - * @param frameRate - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. - Default: null - * @param loop - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. - Default: false - * @param killOnComplete - If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. - Default: false - * @return - - A reference to this Animation instance. + * @param frameRate The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. - Default: null + * @param loop Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. - Default: false + * @param killOnComplete If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. - Default: false + * @return - A reference to this Animation instance. */ play(frameRate?: number, loop?: boolean, killOnComplete?: boolean): Phaser.Animation; /** * Moves backwards the given number of frames in the Animation, taking the loop value into consideration. * - * @param quantity - The number of frames to move back. - Default: 1 + * @param quantity The number of frames to move back. - Default: 1 */ previous(quantity?: number): void; @@ -239,8 +239,8 @@ declare module Phaser { /** * Sets this animations playback to a given frame with the given ID. * - * @param frameId - The identifier of the frame to set. Can be the name of the frame, the sprite index of the frame, or the animation-local frame index. - * @param useLocalFrameIndex - If you provide a number for frameId, should it use the numeric indexes of the frameData, or the 0-indexed frame index local to the animation. - Default: false + * @param frameId The identifier of the frame to set. Can be the name of the frame, the sprite index of the frame, or the animation-local frame index. + * @param useLocalFrameIndex If you provide a number for frameId, should it use the numeric indexes of the frameData, or the 0-indexed frame index local to the animation. - Default: false */ setFrame(frameId?: any, useLocalFrameIndex?: boolean): void; @@ -248,8 +248,8 @@ declare module Phaser { * Stops playback of this animation and set it to a finished state. If a resetFrame is provided it will stop playback and set frame to the first in the animation. * If `dispatchComplete` is true it will dispatch the complete events, otherwise they'll be ignored. * - * @param resetFrame - If true after the animation stops the currentFrame value will be set to the first frame in this animation. - Default: false - * @param dispatchComplete - Dispatch the Animation.onComplete and parent.onAnimationComplete events? - Default: false + * @param resetFrame If true after the animation stops the currentFrame value will be set to the first frame in this animation. - Default: false + * @param dispatchComplete Dispatch the Animation.onComplete and parent.onAnimationComplete events? - Default: false */ stop(resetFrame?: boolean, dispatchComplete?: boolean): void; @@ -261,7 +261,7 @@ declare module Phaser { /** * Changes the FrameData object this Animation is using. * - * @param frameData - The FrameData object that contains all frames used by this Animation. + * @param frameData The FrameData object that contains all frames used by this Animation. */ updateFrameData(frameData: FrameData): void; @@ -279,7 +279,7 @@ declare module Phaser { * The Animation Manager is used to add, play and update Phaser Animations. * Any Game Object such as Phaser.Sprite that supports animation contains a single AnimationManager instance. * - * @param sprite - A reference to the Game Object that owns this AnimationManager. + * @param sprite A reference to the Game Object that owns this AnimationManager. */ constructor(sprite: Phaser.Sprite); @@ -353,12 +353,12 @@ declare module Phaser { * Adds a new animation under the given key. Optionally set the frames, frame rate and loop. * Animations added in this way are played back with the play function. * - * @param name - The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk". - * @param frames - An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used. - Default: null - * @param frameRate - The speed at which the animation should play. The speed is given in frames per second. - Default: 60 - * @param loop - Whether or not the animation is looped or just plays once. - Default: false - * @param useNumericIndex - Are the given frames using numeric indexes (default) or strings? - Default: true - * @return - The Animation object that was created. + * @param name The unique (within this Sprite) name for the animation, i.e. "run", "fire", "walk". + * @param frames An array of numbers/strings that correspond to the frames to add to this animation and in which order. e.g. [1, 2, 3] or ['run0', 'run1', run2]). If null then all frames will be used. - Default: null + * @param frameRate The speed at which the animation should play. The speed is given in frames per second. - Default: 60 + * @param loop Whether or not the animation is looped or just plays once. - Default: false + * @param useNumericIndex Are the given frames using numeric indexes (default) or strings? - Default: true + * @return The Animation object that was created. */ add(name: string, frames?: any[], frameRate?: number, loop?: boolean, useNumericIndex?: boolean): Phaser.Animation; @@ -366,9 +366,9 @@ declare module Phaser { * Loads FrameData into the internal temporary vars and resets the frame index to zero. * This is called automatically when a new Sprite is created. * - * @param frameData - The FrameData set to load. - * @param frame - The frame to default to. - * @return - Returns `true` if the frame data was loaded successfully, otherwise `false` + * @param frameData The FrameData set to load. + * @param frame The frame to default to. + * @return Returns `true` if the frame data was loaded successfully, otherwise `false` */ copyFrameData(frameData: Phaser.FrameData, frame: any): boolean; @@ -381,15 +381,15 @@ declare module Phaser { /** * Returns an animation that was previously added by name. * - * @param name - The name of the animation to be returned, e.g. "fire". - * @return - The Animation instance, if found, otherwise null. + * @param name The name of the animation to be returned, e.g. "fire". + * @return The Animation instance, if found, otherwise null. */ getAnimation(name: string): Phaser.Animation; /** * Advances by the given number of frames in the current animation, taking the loop value into consideration. * - * @param quantity - The number of frames to advance. - Default: 1 + * @param quantity The number of frames to advance. - Default: 1 */ next(quantity?: number): void; @@ -397,18 +397,18 @@ declare module Phaser { * Play an animation based on the given key. The animation should previously have been added via sprite.animations.add() * If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. * - * @param name - The name of the animation to be played, e.g. "fire", "walk", "jump". - * @param frameRate - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. - Default: null - * @param loop - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. - Default: false - * @param killOnComplete - If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. - Default: false - * @return - A reference to playing Animation instance. + * @param name The name of the animation to be played, e.g. "fire", "walk", "jump". + * @param frameRate The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. - Default: null + * @param loop Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. - Default: false + * @param killOnComplete If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. - Default: false + * @return A reference to playing Animation instance. */ play(name: string, frameRate?: number, loop?: boolean, killOnComplete?: boolean): Phaser.Animation; /** * Moves backwards the given number of frames in the current animation, taking the loop value into consideration. * - * @param quantity - The number of frames to move back. - Default: 1 + * @param quantity The number of frames to move back. - Default: 1 */ previous(quantity?: number): void; @@ -421,23 +421,23 @@ declare module Phaser { * Stop playback of an animation. If a name is given that specific animation is stopped, otherwise the current animation is stopped. * The currentAnim property of the AnimationManager is automatically set to the animation given. * - * @param name - The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped. - Default: null - * @param resetFrame - When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false) - Default: false + * @param name The name of the animation to be stopped, e.g. "fire". If none is given the currently running animation is stopped. - Default: null + * @param resetFrame When the animation is stopped should the currentFrame be set to the first frame of the animation (true) or paused on the last frame displayed (false) - Default: false */ stop(name?: string, resetFrame?: boolean): void; /** * The main update function is called by the Sprites update loop. It's responsible for updating animation frames and firing related events. - * @return - True if a new animation frame has been set, otherwise false. + * @return True if a new animation frame has been set, otherwise false. */ update(): boolean; /** * Check whether the frames in the given array are valid and exist. * - * @param frames - An array of frames to be validated. - * @param useNumericIndex - Validate the frames based on their numeric index (true) or string index (false) - Default: true - * @return - True if all given Frames are valid, otherwise false. + * @param frames An array of frames to be validated. + * @param useNumericIndex Validate the frames based on their numeric index (true) or string index (false) - Default: true + * @return True if all given Frames are valid, otherwise false. */ validateFrames(frames: Phaser.Frame[], useNumericIndex?: boolean): boolean; @@ -453,44 +453,44 @@ declare module Phaser { /** * Parse the JSON data and extract the animation frame data from it. * - * @param game - A reference to the currently running game. - * @param json - The JSON data from the Texture Atlas. Must be in Array format. - * @param cacheKey - The Game.Cache asset key of the texture image. - * @return - A FrameData object containing the parsed frames. + * @param game A reference to the currently running game. + * @param json The JSON data from the Texture Atlas. Must be in Array format. + * @param cacheKey The Game.Cache asset key of the texture image. + * @return A FrameData object containing the parsed frames. */ static JSONData(game: Phaser.Game, json: any, cacheKey: string): Phaser.FrameData; /** * Parse the JSON data and extract the animation frame data from it. * - * @param game - A reference to the currently running game. - * @param json - The JSON data from the Texture Atlas. Must be in JSON Hash format. - * @param cacheKey - The Game.Cache asset key of the texture image. - * @return - A FrameData object containing the parsed frames. + * @param game A reference to the currently running game. + * @param json The JSON data from the Texture Atlas. Must be in JSON Hash format. + * @param cacheKey The Game.Cache asset key of the texture image. + * @return A FrameData object containing the parsed frames. */ static JSONDataHash(game: Phaser.Game, json: any, cacheKey: string): Phaser.FrameData; /** * Parse a Sprite Sheet and extract the animation frame data from it. * - * @param game - A reference to the currently running game. - * @param key - The Game.Cache asset key of the Sprite Sheet image. - * @param frameWidth - The fixed width of each frame of the animation. - * @param frameHeight - The fixed height of each frame of the animation. - * @param frameMax - The total number of animation frames to extact from the Sprite Sheet. The default value of -1 means "extract all frames". - Default: -1 - * @param margin - If the frames have been drawn with a margin, specify the amount here. - Default: 0 - * @param spacing - If the frames have been drawn with spacing between them, specify the amount here. - Default: 0 - * @return - A FrameData object containing the parsed frames. + * @param game A reference to the currently running game. + * @param key The Game.Cache asset key of the Sprite Sheet image. + * @param frameWidth The fixed width of each frame of the animation. + * @param frameHeight The fixed height of each frame of the animation. + * @param frameMax The total number of animation frames to extact from the Sprite Sheet. The default value of -1 means "extract all frames". - Default: -1 + * @param margin If the frames have been drawn with a margin, specify the amount here. - Default: 0 + * @param spacing If the frames have been drawn with spacing between them, specify the amount here. - Default: 0 + * @return A FrameData object containing the parsed frames. */ static spriteSheet(game: Phaser.Game, key: string, frameWidth: number, frameHeight: number, frameMax?: number, margin?: number, spacing?: number): Phaser.FrameData; /** * Parse the XML data and extract the animation frame data from it. * - * @param game - A reference to the currently running game. - * @param xml - The XML data from the Texture Atlas. Must be in Starling XML format. - * @param cacheKey - The Game.Cache asset key of the texture image. - * @return - A FrameData object containing the parsed frames. + * @param game A reference to the currently running game. + * @param xml The XML data from the Texture Atlas. Must be in Starling XML format. + * @param cacheKey The Game.Cache asset key of the texture image. + * @return A FrameData object containing the parsed frames. */ static XMLData(game: Phaser.Game, xml: any, cacheKey: string): Phaser.FrameData; @@ -508,8 +508,8 @@ declare module Phaser { * Audio Sprites are a combination of audio files and a JSON configuration. * The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite * - * @param game - Reference to the current game instance. - * @param key - Asset key for the sound. + * @param game Reference to the current game instance. + * @param key Asset key for the sound. */ constructor(game: Phaser.Game, key: string); @@ -549,24 +549,24 @@ declare module Phaser { /** * Get a sound with the given name. * - * @param marker - The name of sound to get. - * @return - The sound instance. + * @param marker The name of sound to get. + * @return The sound instance. */ get(marker: string): Phaser.Sound; /** * Play a sound with the given name. * - * @param marker - The name of sound to play - * @param volume - Volume of the sound you want to play. If none is given it will use the volume given to the Sound when it was created (which defaults to 1 if none was specified). - Default: 1 - * @return - This sound instance. + * @param marker The name of sound to play + * @param volume Volume of the sound you want to play. If none is given it will use the volume given to the Sound when it was created (which defaults to 1 if none was specified). - Default: 1 + * @return This sound instance. */ play(marker: string, volume?: number): Phaser.Sound; /** * Stop a sound with the given name. * - * @param marker - The name of sound to stop. If none is given it will stop all sounds in the audio sprite. - Default: '' + * @param marker The name of sound to stop. If none is given it will stop all sounds in the audio sprite. - Default: '' */ stop(marker: string): Phaser.Sound; @@ -592,7 +592,7 @@ declare module Phaser { * * This used primarily by the Input subsystem. * - * @param list - The backing array: if specified the items in the list _must_ be unique, per `Array.indexOf`, and the ownership of the array _should_ be relinquished to the ArraySet. - Default: (new array) + * @param list The backing array: if specified the items in the list _must_ be unique, per `Array.indexOf`, and the ownership of the array _should_ be relinquished to the ArraySet. - Default: (new array) */ constructor(list: any[]); @@ -628,24 +628,24 @@ declare module Phaser { * Adds a new element to the end of the list. * If the item already exists in the list it is not moved. * - * @param item - The element to add to this list. - * @return - The item that was added. + * @param item The element to add to this list. + * @return The item that was added. */ add(item: any): any; /** * Gets the index of the item in the list, or -1 if it isn't in the list. * - * @param item - The element to get the list index for. - * @return - The index of the item or -1 if not found. + * @param item The element to get the list index for. + * @return The index of the item or -1 if not found. */ getIndex(item: any): number; /** * Checks for the item within this list. * - * @param item - The element to get the list index for. - * @return - True if the item is found in the list, otherwise false. + * @param item The element to get the list index for. + * @return True if the item is found in the list, otherwise false. */ exists(item: any): boolean; @@ -657,16 +657,16 @@ declare module Phaser { /** * Removes the given element from this list if it exists. * - * @param item - The item to be removed from the list. - * @return - item - The item that was removed. + * @param item The item to be removed from the list. + * @return item - The item that was removed. */ remove(item: any): any; /** * Sets the property `key` to the given value on all members of this list. * - * @param key - The propety of the item to set. - * @param value - The value to set the property to. + * @param key The propety of the item to set. + * @param value The value to set the property to. */ setAll(key: any, value: any): void; @@ -676,8 +676,8 @@ declare module Phaser { * If the `key` property is present it must be a function. * The function is invoked using the item as the context. * - * @param key - The name of the property with the function to call. - * @param args - Additional parameters that will be passed to the callback. + * @param key The name of the property with the function to call. + * @param args Additional parameters that will be passed to the callback. */ callAll(key: string, ...parameter: any[]): void; @@ -696,10 +696,10 @@ declare module Phaser { * Will return null if there are no array items that fall within the specified range * or if there is no item for the randomly choosen index. * - * @param objects - An array of objects. - * @param startIndex - Optional offset off the front of the array. Default value is 0, or the beginning of the array. - * @param length - Optional restriction on the number of values you want to randomly select from. - * @return - The random object that was selected. + * @param objects An array of objects. + * @param startIndex Optional offset off the front of the array. Default value is 0, or the beginning of the array. + * @param length Optional restriction on the number of values you want to randomly select from. + * @return The random object that was selected. */ static getRandomItem(objects: T[], startIndex?: number, length?: number): T; @@ -709,26 +709,26 @@ declare module Phaser { * Will return null if there are no array items that fall within the specified range * or if there is no item for the randomly choosen index. * - * @param objects - An array of objects. - * @param startIndex - Optional offset off the front of the array. Default value is 0, or the beginning of the array. - * @param length - Optional restriction on the number of values you want to randomly select from. - * @return - The random object that was removed. + * @param objects An array of objects. + * @param startIndex Optional offset off the front of the array. Default value is 0, or the beginning of the array. + * @param length Optional restriction on the number of values you want to randomly select from. + * @return The random object that was removed. */ static removeRandomItem(objects: T[], startIndex?: number, length?: number): T; /** * A standard Fisher-Yates Array shuffle implementation which modifies the array in place. * - * @param array - The array to shuffle. - * @return - The original array, now shuffled. + * @param array The array to shuffle. + * @return The original array, now shuffled. */ static shuffle(array: T[]): T[]; /** * Transposes the elements of the given matrix (array of arrays). * - * @param array - The matrix to transpose. - * @return - A new transposed matrix + * @param array The matrix to transpose. + * @return A new transposed matrix */ static transposeMatrix(array: T[]): T; @@ -737,9 +737,9 @@ declare module Phaser { * * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}. * - * @param matrix - The array to rotate; this matrix _may_ be altered. - * @param direction - The amount to rotate: the roation in degrees (90, -90, 270, -270, 180) or a string command ('rotateLeft', 'rotateRight' or 'rotate180'). - * @return - The rotated matrix. The source matrix should be discarded for the returned matrix. + * @param matrix The array to rotate; this matrix _may_ be altered. + * @param direction The amount to rotate: the roation in degrees (90, -90, 270, -270, 180) or a string command ('rotateLeft', 'rotateRight' or 'rotate180'). + * @return The rotated matrix. The source matrix should be discarded for the returned matrix. */ static rotateMatrix(matrix: any, direction: number): any; @@ -747,9 +747,9 @@ declare module Phaser { * Snaps a value to the nearest value in an array. * The result will always be in the range `[first_value, last_value]`. * - * @param value - The search value - * @param arr - The input array which _must_ be sorted. - * @return - The nearest value found. + * @param value The search value + * @param arr The input array which _must_ be sorted. + * @return The nearest value found. */ static findClosest(value: number, arr: number[]): number; @@ -757,8 +757,8 @@ declare module Phaser { * Moves the element from the start of the array to the end, shifting all items in the process. * The "rotation" happens to the left. * - * @param array - The array to shift/rotate. The array is modified. - * @return - The shifted value. + * @param array The array to shift/rotate. The array is modified. + * @return The shifted value. */ static rotate(array: any[]): any; static numberArray(start: number, end: number): number[]; @@ -780,10 +780,10 @@ declare module Phaser { * A single BitmapData can be used as the texture for one or many Images/Sprites. * So if you need to dynamically create a Sprite texture then they are a good choice. * - * @param game - A reference to the currently running game. - * @param key - Internal Phaser reference key for the render texture. - * @param width - The width of the BitmapData in pixels. - Default: 256 - * @param height - The height of the BitmapData in pixels. - Default: 256 + * @param game A reference to the currently running game. + * @param key Internal Phaser reference key for the render texture. + * @param width The width of the BitmapData in pixels. - Default: 256 + * @param height The height of the BitmapData in pixels. - Default: 256 */ constructor(game: Phaser.Game, key: string, width?: number, height?: number); @@ -874,13 +874,13 @@ declare module Phaser { /** * Gets a JavaScript object that has 6 properties set that are used by BitmapData in a transform. * - * @param translateX - The x translate value. - * @param translateY - The y translate value. - * @param scaleX - The scale x value. - * @param scaleY - The scale y value. - * @param skewX - The skew x value. - * @param skewY - The skew y value. - * @return - A JavaScript object containing all of the properties BitmapData needs for transforms. + * @param translateX The x translate value. + * @param translateY The y translate value. + * @param scaleX The scale x value. + * @param scaleY The scale y value. + * @param skewX The skew x value. + * @param skewY The skew y value. + * @return A JavaScript object containing all of the properties BitmapData needs for transforms. */ static getTransform(translateX: number, translateY: number, scaleX: number, scaleY: number, skewX: number, skewY: number): any; @@ -888,205 +888,205 @@ declare module Phaser { /** * Updates the given objects so that they use this BitmapData as their texture. This will replace any texture they will currently have set. * - * @param object - Either a single Sprite/Image or an Array of Sprites/Images. - * @return - This BitmapData object for method chaining. + * @param object Either a single Sprite/Image or an Array of Sprites/Images. + * @return This BitmapData object for method chaining. */ add(object: any): Phaser.BitmapData; /** * Creates a new Phaser.Image object, assigns this BitmapData to be its texture, adds it to the world then returns it. * - * @param x - The x coordinate to place the Image at. - Default: 0 - * @param y - The y coordinate to place the Image at. - Default: 0 - * @param anchorX - Set the x anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. - Default: 0 - * @param anchorY - Set the y anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. - Default: 0 - * @param scaleX - The horizontal scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on. - Default: 1 - * @param scaleY - The vertical scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on. - Default: 1 - * @return - The newly added Image object. + * @param x The x coordinate to place the Image at. - Default: 0 + * @param y The y coordinate to place the Image at. - Default: 0 + * @param anchorX Set the x anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. - Default: 0 + * @param anchorY Set the y anchor point of the Image. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. - Default: 0 + * @param scaleX The horizontal scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on. - Default: 1 + * @param scaleY The vertical scale factor of the Image. A value of 1 means no scaling. 2 would be twice the size, and so on. - Default: 1 + * @return The newly added Image object. */ addToWorld(x?: number, y?: number, anchorX?: number, anchorY?: number, scaleX?: number, scaleY?: number): Phaser.Image; /** * Draws the image onto this BitmapData using an image as an alpha mask. * - * @param source - The source to copy from. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself. - * @param mask - The object to be used as the mask. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself. If you don't provide a mask it will use this BitmapData as the mask. - * @param sourceRect - A Rectangle where x/y define the coordinates to draw the Source image to and width/height define the size. - * @param maskRect - A Rectangle where x/y define the coordinates to draw the Mask image to and width/height define the size. - * @return - This BitmapData object for method chaining. + * @param source The source to copy from. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself. + * @param mask The object to be used as the mask. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself. If you don't provide a mask it will use this BitmapData as the mask. + * @param sourceRect A Rectangle where x/y define the coordinates to draw the Source image to and width/height define the size. + * @param maskRect A Rectangle where x/y define the coordinates to draw the Mask image to and width/height define the size. + * @return This BitmapData object for method chaining. */ alphaMask(source: any, mask?: any, sourceRect?: Phaser.Rectangle, maskRect?: Phaser.Rectangle): Phaser.BitmapData; /** * Sets the blend mode to 'lighter' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendAdd(): Phaser.BitmapData; /** * Sets the blend mode to 'color' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendColor(): Phaser.BitmapData; /** * Sets the blend mode to 'color-burn' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendColorBurn(): Phaser.BitmapData; /** * Sets the blend mode to 'color-dodge' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendColorDodge(): Phaser.BitmapData; /** * Sets the blend mode to 'darken' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendDarken(): Phaser.BitmapData; /** * Sets the blend mode to 'destination-atop' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendDestinationAtop(): Phaser.BitmapData; /** * Sets the blend mode to 'destination-in' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendDestinationIn(): Phaser.BitmapData; /** * Sets the blend mode to 'destination-out' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendDestinationOut(): Phaser.BitmapData; /** * Sets the blend mode to 'destination-over' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendDestinationOver(): Phaser.BitmapData; /** * Sets the blend mode to 'difference' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendDifference(): Phaser.BitmapData; /** * Sets the blend mode to 'exclusion' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendExclusion(): Phaser.BitmapData; /** * Sets the blend mode to 'hard-light' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendHardLight(): Phaser.BitmapData; /** * Sets the blend mode to 'hue' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendHue(): Phaser.BitmapData; /** * Sets the blend mode to 'lighten' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendLighten(): Phaser.BitmapData; /** * Sets the blend mode to 'luminosity' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendLuminosity(): Phaser.BitmapData; /** * Sets the blend mode to 'multiply' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendMultiply(): Phaser.BitmapData; /** * Sets the blend mode to 'overlay' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendOverlay(): Phaser.BitmapData; /** * Resets the blend mode (effectively sets it to 'source-over') - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendReset(): Phaser.BitmapData; /** * Sets the blend mode to 'saturation' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendSaturation(): Phaser.BitmapData; /** * Sets the blend mode to 'screen' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendScreen(): Phaser.BitmapData; /** * Sets the blend mode to 'soft-light' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendSoftLight(): Phaser.BitmapData; /** * Sets the blend mode to 'source-atop' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendSourceAtop(): Phaser.BitmapData; /** * Sets the blend mode to 'source-in' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendSourceIn(): Phaser.BitmapData; /** * Sets the blend mode to 'source-out' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendSourceOut(): Phaser.BitmapData; /** * Sets the blend mode to 'source-over' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendSourceOver(): Phaser.BitmapData; /** * Sets the blend mode to 'xor' - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ blendXor(): Phaser.BitmapData; /** * Draws a filled Circle to the BitmapData at the given x, y coordinates and radius in size. * - * @param x - The x coordinate to draw the Circle at. This is the center of the circle. - * @param y - The y coordinate to draw the Circle at. This is the center of the circle. - * @param radius - The radius of the Circle in pixels. The radius is half the diameter. - * @param fillStyle - If set the context fillStyle will be set to this value before the circle is drawn. - * @return - This BitmapData object for method chaining. + * @param x The x coordinate to draw the Circle at. This is the center of the circle. + * @param y The y coordinate to draw the Circle at. This is the center of the circle. + * @param radius The radius of the Circle in pixels. The radius is half the diameter. + * @param fillStyle If set the context fillStyle will be set to this value before the circle is drawn. + * @return This BitmapData object for method chaining. */ circle(x: number, y: number, radius: number, fillStyle?: string): Phaser.BitmapData; /** * Clears the BitmapData context using a clearRect. - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ clear(): Phaser.BitmapData; @@ -1104,24 +1104,24 @@ declare module Phaser { * This method has a lot of parameters for maximum control. * You can use the more friendly methods like `copyRect` and `draw` to avoid having to remember them all. * - * @param source - The source to copy from. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself. - * @param x - The x coordinate representing the top-left of the region to copy from the source image. - Default: 0 - * @param y - The y coordinate representing the top-left of the region to copy from the source image. - Default: 0 - * @param width - The width of the region to copy from the source image. If not specified it will use the full source image width. - * @param height - The height of the region to copy from the source image. If not specified it will use the full source image height. - * @param tx - The x coordinate to translate to before drawing. If not specified it will default to the `x` parameter. If `null` and `source` is a Display Object, it will default to `source.x`. - * @param ty - The y coordinate to translate to before drawing. If not specified it will default to the `y` parameter. If `null` and `source` is a Display Object, it will default to `source.y`. - * @param newWidth - The new width of the block being copied. If not specified it will default to the `width` parameter. - * @param newHeight - The new height of the block being copied. If not specified it will default to the `height` parameter. - * @param rotate - The angle in radians to rotate the block to before drawing. Rotation takes place around the center by default, but can be changed with the `anchor` parameters. - Default: 0 - * @param anchorX - The anchor point around which the block is rotated and scaled. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. - Default: 0 - * @param anchorY - The anchor point around which the block is rotated and scaled. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. - Default: 0 - * @param scaleX - The horizontal scale factor of the block. A value of 1 means no scaling. 2 would be twice the size, and so on. - Default: 1 - * @param scaleY - The vertical scale factor of the block. A value of 1 means no scaling. 2 would be twice the size, and so on. - Default: 1 - * @param alpha - The alpha that will be set on the context before drawing. A value between 0 (fully transparent) and 1, opaque. - Default: 1 - * @param blendMode - The composite blend mode that will be used when drawing. The default is no blend mode at all. - Default: null - * @param roundPx - Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. - Default: false - * @return - This BitmapData object for method chaining. + * @param source The source to copy from. If you give a string it will try and find the Image in the Game.Cache first. This is quite expensive so try to provide the image itself. + * @param x The x coordinate representing the top-left of the region to copy from the source image. - Default: 0 + * @param y The y coordinate representing the top-left of the region to copy from the source image. - Default: 0 + * @param width The width of the region to copy from the source image. If not specified it will use the full source image width. + * @param height The height of the region to copy from the source image. If not specified it will use the full source image height. + * @param tx The x coordinate to translate to before drawing. If not specified it will default to the `x` parameter. If `null` and `source` is a Display Object, it will default to `source.x`. + * @param ty The y coordinate to translate to before drawing. If not specified it will default to the `y` parameter. If `null` and `source` is a Display Object, it will default to `source.y`. + * @param newWidth The new width of the block being copied. If not specified it will default to the `width` parameter. + * @param newHeight The new height of the block being copied. If not specified it will default to the `height` parameter. + * @param rotate The angle in radians to rotate the block to before drawing. Rotation takes place around the center by default, but can be changed with the `anchor` parameters. - Default: 0 + * @param anchorX The anchor point around which the block is rotated and scaled. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. - Default: 0 + * @param anchorY The anchor point around which the block is rotated and scaled. A value between 0 and 1, where 0 is the top-left and 1 is bottom-right. - Default: 0 + * @param scaleX The horizontal scale factor of the block. A value of 1 means no scaling. 2 would be twice the size, and so on. - Default: 1 + * @param scaleY The vertical scale factor of the block. A value of 1 means no scaling. 2 would be twice the size, and so on. - Default: 1 + * @param alpha The alpha that will be set on the context before drawing. A value between 0 (fully transparent) and 1, opaque. - Default: 1 + * @param blendMode The composite blend mode that will be used when drawing. The default is no blend mode at all. - Default: null + * @param roundPx Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. - Default: false + * @return This BitmapData object for method chaining. */ copy(source?: any, x?: number, y?: number, width?: number, height?: number, tx?: number, ty?: number, newWidth?: number, newHeight?: number, rotate?: number, anchorX?: number, anchorY?: number, scaleX?: number, scaleY?: number, alpha?: number, blendMode?: number, roundPx?: boolean): Phaser.BitmapData; copyPixels(source: any, area: Phaser.Rectangle, x: number, y: number, alpha?: number): void; @@ -1129,14 +1129,14 @@ declare module Phaser { /** * Copies the area defined by the Rectangle parameter from the source image to this BitmapData at the given location. * - * @param source - The Image to copy from. If you give a string it will try and find the Image in the Game.Cache. - * @param area - The Rectangle region to copy from the source image. - * @param x - The destination x coordinate to copy the image to. - * @param y - The destination y coordinate to copy the image to. - * @param alpha - The alpha that will be set on the context before drawing. A value between 0 (fully transparent) and 1, opaque. - Default: 1 - * @param blendMode - The composite blend mode that will be used when drawing. The default is no blend mode at all. - Default: null - * @param roundPx - Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. - Default: false - * @return - This BitmapData object for method chaining. + * @param source The Image to copy from. If you give a string it will try and find the Image in the Game.Cache. + * @param area The Rectangle region to copy from the source image. + * @param x The destination x coordinate to copy the image to. + * @param y The destination y coordinate to copy the image to. + * @param alpha The alpha that will be set on the context before drawing. A value between 0 (fully transparent) and 1, opaque. - Default: 1 + * @param blendMode The composite blend mode that will be used when drawing. The default is no blend mode at all. - Default: null + * @param roundPx Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. - Default: false + * @return This BitmapData object for method chaining. */ copyRect(source: any, area: Phaser.Rectangle, x?: number, y?: number, alpha?: number, blendMode?: number, roundPx?: boolean): Phaser.BitmapData; @@ -1145,14 +1145,14 @@ declare module Phaser { * You can use the optional width and height values to 'stretch' the sprite as it is drawn. This uses drawImage stretching, not scaling. * When drawing it will take into account the Sprites rotation, scale and alpha values. * - * @param source - The Sprite, Image or Text object to draw onto this BitmapData. - * @param x - The x coordinate to translate to before drawing. If not specified it will default to `source.x`. - Default: 0 - * @param y - The y coordinate to translate to before drawing. If not specified it will default to `source.y`. - Default: 0 - * @param width - The new width of the Sprite being copied. If not specified it will default to `source.width`. - * @param height - The new height of the Sprite being copied. If not specified it will default to `source.height`. - * @param blendMode - The composite blend mode that will be used when drawing the Sprite. The default is no blend mode at all. - Default: null - * @param roundPx - Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. - Default: false - * @return - This BitmapData object for method chaining. + * @param source The Sprite, Image or Text object to draw onto this BitmapData. + * @param x The x coordinate to translate to before drawing. If not specified it will default to `source.x`. - Default: 0 + * @param y The y coordinate to translate to before drawing. If not specified it will default to `source.y`. - Default: 0 + * @param width The new width of the Sprite being copied. If not specified it will default to `source.width`. + * @param height The new height of the Sprite being copied. If not specified it will default to `source.height`. + * @param blendMode The composite blend mode that will be used when drawing the Sprite. The default is no blend mode at all. - Default: null + * @param roundPx Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. - Default: false + * @return This BitmapData object for method chaining. */ draw(source: any, x?: number, y?: number, width?: number, height?: number, blendMode?: number, roundPx?: boolean): Phaser.BitmapData; @@ -1163,10 +1163,10 @@ declare module Phaser { * When drawing it will take into account the child's rotation, scale and alpha values. * No iteration takes place. Groups nested inside other Groups will not be iterated through. * - * @param group - The Group to draw onto this BitmapData. - * @param blendMode - The composite blend mode that will be used when drawing the Group children. The default is no blend mode at all. - Default: null - * @param roundPx - Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. - Default: false - * @return - This BitmapData object for method chaining. + * @param group The Group to draw onto this BitmapData. + * @param blendMode The composite blend mode that will be used when drawing the Group children. The default is no blend mode at all. - Default: null + * @param roundPx Should the x and y values be rounded to integers before drawing? This prevents anti-aliasing in some instances. - Default: false + * @return This BitmapData object for method chaining. */ drawGroup(group: Phaser.Group, blendMode?: number, roundPx?: boolean): Phaser.BitmapData; @@ -1180,27 +1180,27 @@ declare module Phaser { * If not given it will be written as the same color it was extracted. You can provide one or more alternative colors, allowing you to tint * the color during extraction. * - * @param destination - The BitmapData that the extracted pixels will be drawn to. - * @param r - The red color component, in the range 0 - 255. - * @param g - The green color component, in the range 0 - 255. - * @param b - The blue color component, in the range 0 - 255. - * @param a - The alpha color component, in the range 0 - 255 that the new pixel will be drawn at. - Default: 255 - * @param resize - Should the destination BitmapData be resized to match this one before the pixels are copied? - Default: false - * @param r2 - An alternative red color component to be written to the destination, in the range 0 - 255. - * @param g2 - An alternative green color component to be written to the destination, in the range 0 - 255. - * @param b2 - An alternative blue color component to be written to the destination, in the range 0 - 255. - * @return - The BitmapData that the extract pixels were drawn on. + * @param destination The BitmapData that the extracted pixels will be drawn to. + * @param r The red color component, in the range 0 - 255. + * @param g The green color component, in the range 0 - 255. + * @param b The blue color component, in the range 0 - 255. + * @param a The alpha color component, in the range 0 - 255 that the new pixel will be drawn at. - Default: 255 + * @param resize Should the destination BitmapData be resized to match this one before the pixels are copied? - Default: false + * @param r2 An alternative red color component to be written to the destination, in the range 0 - 255. + * @param g2 An alternative green color component to be written to the destination, in the range 0 - 255. + * @param b2 An alternative blue color component to be written to the destination, in the range 0 - 255. + * @return The BitmapData that the extract pixels were drawn on. */ extract(destination: Phaser.BitmapData, r: number, g: number, b: number, a?: number, resize?: boolean, r2?: number, g2?: number, b2?: number): Phaser.BitmapData; /** * Fills the BitmapData with the given color. * - * @param r - The red color value, between 0 and 0xFF (255). - * @param g - The green color value, between 0 and 0xFF (255). - * @param b - The blue color value, between 0 and 0xFF (255). - * @param a - The alpha color value, between 0 and 1. - Default: 1 - * @return - This BitmapData object for method chaining. + * @param r The red color value, between 0 and 0xFF (255). + * @param g The green color value, between 0 and 0xFF (255). + * @param b The blue color value, between 0 and 0xFF (255). + * @param a The alpha color value, between 0 and 1. - Default: 1 + * @return This BitmapData object for method chaining. */ fill(r: number, g: number, b: number, a?: number): Phaser.BitmapData; @@ -1208,8 +1208,8 @@ declare module Phaser { * Scans the BitmapData and calculates the bounds. This is a rectangle that defines the extent of all non-transparent pixels. * The rectangle returned will extend from the top-left of the image to the bottom-right, exluding transparent pixels. * - * @param rect - If provided this Rectangle object will be populated with the bounds, otherwise a new object will be created. - * @return - A Rectangle whose dimensions encompass the full extent of non-transparent pixels in this BitmapData. + * @param rect If provided this Rectangle object will be populated with the bounds, otherwise a new object will be created. + * @return A Rectangle whose dimensions encompass the full extent of non-transparent pixels in this BitmapData. */ getBounds(rect?: Phaser.Rectangle): Phaser.Rectangle; @@ -1224,8 +1224,8 @@ declare module Phaser { * 2 = left to right * 3 = right to left * - * @param direction - The direction in which to scan for the first pixel. 0 = top to bottom, 1 = bottom to top, 2 = left to right and 3 = right to left. - Default: 0 - * @return - Returns an object containing the colour of the pixel in the `r`, `g` and `b` properties and the location in the `x` and `y` properties. + * @param direction The direction in which to scan for the first pixel. 0 = top to bottom, 1 = bottom to top, 2 = left to right and 3 = right to left. - Default: 0 + * @return Returns an object containing the colour of the pixel in the `r`, `g` and `b` properties and the location in the `x` and `y` properties. */ getFirstPixel(direction: number): { r: number; g: number; b: number; x: number; y: number; }; @@ -1234,10 +1234,10 @@ declare module Phaser { * If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer, * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist. * - * @param x - The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. - * @param y - The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. - * @param out - An object into which 4 properties will be created: r, g, b and a. If not provided a new object will be created. - * @return - An object with the red, green, blue and alpha values set in the r, g, b and a properties. + * @param x The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. + * @param y The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. + * @param out An object into which 4 properties will be created: r, g, b and a. If not provided a new object will be created. + * @return An object with the red, green, blue and alpha values set in the r, g, b and a properties. */ getPixel(x: number, y: number, out?: any): number; @@ -1246,12 +1246,12 @@ declare module Phaser { * If you have drawn anything to the BitmapData since it was created you must call BitmapData.update to refresh the array buffer, * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist. * - * @param x - The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. - * @param y - The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. - * @param out - An object into which 3 properties will be created: r, g and b. If not provided a new object will be created. - * @param hsl - Also convert the rgb values into hsl? - Default: false - * @param hsv - Also convert the rgb values into hsv? - Default: false - * @return - An object with the red, green and blue values set in the r, g and b properties. + * @param x The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. + * @param y The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. + * @param out An object into which 3 properties will be created: r, g and b. If not provided a new object will be created. + * @param hsl Also convert the rgb values into hsl? - Default: false + * @param hsv Also convert the rgb values into hsv? - Default: false + * @return An object with the red, green and blue values set in the r, g and b properties. */ getPixelRGB(x: number, y: number, out?: any, hsl?: boolean, hsv?: boolean): any; @@ -1261,30 +1261,30 @@ declare module Phaser { * otherwise this may return out of date color values, or worse - throw a run-time error as it tries to access an array element that doesn't exist. * Note that on little-endian systems the format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA. * - * @param x - The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. - * @param y - The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. - * @return - A native color value integer (format: 0xAARRGGBB) + * @param x The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. + * @param y The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. + * @return A native color value integer (format: 0xAARRGGBB) */ getPixel32(x: number, y: number): number; /** * Gets all the pixels from the region specified by the given Rectangle object. * - * @param rect - The Rectangle region to get. - * @return - Returns a ImageData object containing a Uint8ClampedArray data property. + * @param rect The Rectangle region to get. + * @return Returns a ImageData object containing a Uint8ClampedArray data property. */ getPixels(rect: Phaser.Rectangle): ImageData; /** * Gets a JavaScript object that has 6 properties set that are used by BitmapData in a transform. * - * @param translateX - The x translate value. - * @param translateY - The y translate value. - * @param scaleX - The scale x value. - * @param scaleY - The scale y value. - * @param skewX - The skew x value. - * @param skewY - The skew y value. - * @return - A JavaScript object containing all of the properties BitmapData needs for transforms. + * @param translateX The x translate value. + * @param translateY The y translate value. + * @param scaleX The scale x value. + * @param scaleY The scale y value. + * @param skewX The skew x value. + * @param skewY The skew y value. + * @return A JavaScript object containing all of the properties BitmapData needs for transforms. */ getTransform(translateX: number, translateY: number, scaleX: number, scaleY: number, skewX: number, skewY: number): any; @@ -1294,8 +1294,8 @@ declare module Phaser { * If the source object uses a texture as part of a Texture Atlas or Sprite Sheet, only the current frame will be used for sizing. * If a string is given it will assume it's a cache key and look in Phaser.Cache for an image key matching the string. * - * @param source - The object that will be used to populate this BitmapData. If you give a string it will try and find the Image in the Game.Cache first. - * @return - This BitmapData object for method chaining. + * @param source The object that will be used to populate this BitmapData. If you give a string it will try and find the Image in the Game.Cache first. + * @return This BitmapData object for method chaining. */ load(source: any): Phaser.BitmapData; @@ -1306,13 +1306,13 @@ declare module Phaser { * It is expected that your callback will deal with endianess. If you'd rather Phaser did it then use processPixelRGB instead. * The callback will also be sent the pixels x and y coordinates respectively. * - * @param callback - The callback that will be sent each pixel color to be processed. - * @param callbackContext - The context under which the callback will be called. - * @param x - The x coordinate of the top-left of the region to process from. - Default: 0 - * @param y - The y coordinate of the top-left of the region to process from. - Default: 0 - * @param width - The width of the region to process. - * @param height - The height of the region to process. - * @return - This BitmapData object for method chaining. + * @param callback The callback that will be sent each pixel color to be processed. + * @param callbackContext The context under which the callback will be called. + * @param x The x coordinate of the top-left of the region to process from. - Default: 0 + * @param y The y coordinate of the top-left of the region to process from. - Default: 0 + * @param width The width of the region to process. + * @param height The height of the region to process. + * @return This BitmapData object for method chaining. */ processPixel(callback: Function, callbackContext: any, x?: number, y?: Number, width?: number, height?: number): Phaser.BitmapData; @@ -1326,25 +1326,25 @@ declare module Phaser { * The callback must return either `false`, in which case no change will be made to the pixel, or a new color object. * If a new color object is returned the pixel will be set to the r, g, b and a color values given within it. * - * @param callback - The callback that will be sent each pixel color object to be processed. - * @param callbackContext - The context under which the callback will be called. - * @param x - The x coordinate of the top-left of the region to process from. - Default: 0 - * @param y - The y coordinate of the top-left of the region to process from. - Default: 0 - * @param width - The width of the region to process. - * @param height - The height of the region to process. - * @return - This BitmapData object for method chaining. + * @param callback The callback that will be sent each pixel color object to be processed. + * @param callbackContext The context under which the callback will be called. + * @param x The x coordinate of the top-left of the region to process from. - Default: 0 + * @param y The y coordinate of the top-left of the region to process from. - Default: 0 + * @param width The width of the region to process. + * @param height The height of the region to process. + * @return This BitmapData object for method chaining. */ processPixelRGB(callback: Function, callbackContext: any, x?: number, y?: Number, width?: number, height?: number): Phaser.BitmapData; /** * Draws a filled Rectangle to the BitmapData at the given x, y coordinates and width / height in size. * - * @param x - The x coordinate of the top-left of the Rectangle. - * @param y - The y coordinate of the top-left of the Rectangle. - * @param width - The width of the Rectangle. - * @param height - The height of the Rectangle. - * @param fillStyle - If set the context fillStyle will be set to this value before the rect is drawn. - * @return - This BitmapData object for method chaining. + * @param x The x coordinate of the top-left of the Rectangle. + * @param y The y coordinate of the top-left of the Rectangle. + * @param width The width of the Rectangle. + * @param height The height of the Rectangle. + * @param fillStyle If set the context fillStyle will be set to this value before the rect is drawn. + * @return This BitmapData object for method chaining. */ rect(x: number, y: number, width: number, height: number, fillStyle?: string): Phaser.BitmapData; @@ -1352,7 +1352,7 @@ declare module Phaser { * If the game is running in WebGL this will push the texture up to the GPU if it's dirty. * This is called automatically if the BitmapData is being used by a Sprite, otherwise you need to remember to call it in your render function. * If you wish to suppress this functionality set BitmapData.disableTextureUpload to `true`. - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ render(): Phaser.BitmapData; @@ -1360,61 +1360,61 @@ declare module Phaser { * Replaces all pixels matching one color with another. The color values are given as two sets of RGBA values. * An optional region parameter controls if the replacement happens in just a specific area of the BitmapData or the entire thing. * - * @param r1 - The red color value to be replaced. Between 0 and 255. - * @param g1 - The green color value to be replaced. Between 0 and 255. - * @param b1 - The blue color value to be replaced. Between 0 and 255. - * @param a1 - The alpha color value to be replaced. Between 0 and 255. - * @param r2 - The red color value that is the replacement color. Between 0 and 255. - * @param g2 - The green color value that is the replacement color. Between 0 and 255. - * @param b2 - The blue color value that is the replacement color. Between 0 and 255. - * @param a2 - The alpha color value that is the replacement color. Between 0 and 255. - * @param region - The area to perform the search over. If not given it will replace over the whole BitmapData. - * @return - This BitmapData object for method chaining. + * @param r1 The red color value to be replaced. Between 0 and 255. + * @param g1 The green color value to be replaced. Between 0 and 255. + * @param b1 The blue color value to be replaced. Between 0 and 255. + * @param a1 The alpha color value to be replaced. Between 0 and 255. + * @param r2 The red color value that is the replacement color. Between 0 and 255. + * @param g2 The green color value that is the replacement color. Between 0 and 255. + * @param b2 The blue color value that is the replacement color. Between 0 and 255. + * @param a2 The alpha color value that is the replacement color. Between 0 and 255. + * @param region The area to perform the search over. If not given it will replace over the whole BitmapData. + * @return This BitmapData object for method chaining. */ replaceRGB(r1: number, g1: number, b1: number, a1: number, r2: number, g2: number, b2: number, a2: number, region: Phaser.Rectangle): Phaser.BitmapData; /** * Resizes the BitmapData. This changes the size of the underlying canvas and refreshes the buffer. - * @return - This BitmapData object for method chaining. + * @return This BitmapData object for method chaining. */ resize(width: number, height: number): Phaser.BitmapData; /** * Sets the hue, saturation and lightness values on every pixel in the given region, or the whole BitmapData if no region was specified. * - * @param h - The hue, in the range 0 - 1. - Default: null - * @param s - The saturation, in the range 0 - 1. - Default: null - * @param l - The lightness, in the range 0 - 1. - Default: null - * @param region - The area to perform the operation on. If not given it will run over the whole BitmapData. - * @return - This BitmapData object for method chaining. + * @param h The hue, in the range 0 - 1. - Default: null + * @param s The saturation, in the range 0 - 1. - Default: null + * @param l The lightness, in the range 0 - 1. - Default: null + * @param region The area to perform the operation on. If not given it will run over the whole BitmapData. + * @return This BitmapData object for method chaining. */ setHSL(h?: number, s?: number, l?: number, region?: Phaser.Rectangle): Phaser.BitmapData; /** * Sets the color of the given pixel to the specified red, green and blue values. * - * @param x - The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. - * @param y - The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. - * @param red - The red color value, between 0 and 0xFF (255). - * @param green - The green color value, between 0 and 0xFF (255). - * @param blue - The blue color value, between 0 and 0xFF (255). - * @param alpha - The alpha color value, between 0 and 0xFF (255). - * @param immediate - If `true` the context.putImageData will be called and the dirty flag set. - Default: true - * @return - This BitmapData object for method chaining. + * @param x The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. + * @param y The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. + * @param red The red color value, between 0 and 0xFF (255). + * @param green The green color value, between 0 and 0xFF (255). + * @param blue The blue color value, between 0 and 0xFF (255). + * @param alpha The alpha color value, between 0 and 0xFF (255). + * @param immediate If `true` the context.putImageData will be called and the dirty flag set. - Default: true + * @return This BitmapData object for method chaining. */ setPixel(x: number, y: number, red: number, green: number, blue: number, immediate?: boolean): Phaser.BitmapData; /** * Sets the color of the given pixel to the specified red, green, blue and alpha values. * - * @param x - The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. - * @param y - The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. - * @param red - The red color value, between 0 and 0xFF (255). - * @param green - The green color value, between 0 and 0xFF (255). - * @param blue - The blue color value, between 0 and 0xFF (255). - * @param alpha - The alpha color value, between 0 and 0xFF (255). - * @param immediate - If `true` the context.putImageData will be called and the dirty flag set. - Default: true - * @return - This BitmapData object for method chaining. + * @param x The x coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. + * @param y The y coordinate of the pixel to be set. Must lay within the dimensions of this BitmapData. + * @param red The red color value, between 0 and 0xFF (255). + * @param green The green color value, between 0 and 0xFF (255). + * @param blue The blue color value, between 0 and 0xFF (255). + * @param alpha The alpha color value, between 0 and 0xFF (255). + * @param immediate If `true` the context.putImageData will be called and the dirty flag set. - Default: true + * @return This BitmapData object for method chaining. */ setPixel32(x: number, y: number, red: number, green: number, blue: number, alpha: number, immediate?: boolean): Phaser.BitmapData; @@ -1423,11 +1423,11 @@ declare module Phaser { * You can cancel an existing shadow by calling this method and passing no parameters. * Note: At the time of writing (October 2014) Chrome still doesn't support shadowBlur used with drawImage. * - * @param color - The color of the shadow, given in a CSS format, i.e. `#000000` or `rgba(0,0,0,1)`. If `null` or `undefined` the shadow will be reset. - * @param blur - The amount the shadow will be blurred by. Low values = a crisp shadow, high values = a softer shadow. - Default: 5 - * @param x - The horizontal offset of the shadow in pixels. - Default: 10 - * @param y - The vertical offset of the shadow in pixels. - Default: 10 - * @return - This BitmapData object for method chaining. + * @param color The color of the shadow, given in a CSS format, i.e. `#000000` or `rgba(0,0,0,1)`. If `null` or `undefined` the shadow will be reset. + * @param blur The amount the shadow will be blurred by. Low values = a crisp shadow, high values = a softer shadow. - Default: 5 + * @param x The horizontal offset of the shadow in pixels. - Default: 10 + * @param y The vertical offset of the shadow in pixels. - Default: 10 + * @return This BitmapData object for method chaining. */ shadow(color: string, blur?: number, x?: number, y?: number): Phaser.BitmapData; @@ -1436,21 +1436,21 @@ declare module Phaser { * Shifting will add the given value onto the current h, s and l values, not replace them. * The hue is wrapped to keep it within the range 0 to 1. Saturation and lightness are clamped to not exceed 1. * - * @param h - The amount to shift the hue by. - Default: null - * @param s - The amount to shift the saturation by. - Default: null - * @param l - The amount to shift the lightness by. - Default: null - * @param region - The area to perform the operation on. If not given it will run over the whole BitmapData. - * @return - This BitmapData object for method chaining. + * @param h The amount to shift the hue by. - Default: null + * @param s The amount to shift the saturation by. - Default: null + * @param l The amount to shift the lightness by. - Default: null + * @param region The area to perform the operation on. If not given it will run over the whole BitmapData. + * @return This BitmapData object for method chaining. */ shiftHSL(h?: number, s?: number, l?: number, region?: Phaser.Rectangle): Phaser.BitmapData; /** * Takes the given Line object and image and renders it to this BitmapData as a repeating texture line. * - * @param line - A Phaser.Line object that will be used to plot the start and end of the line. - * @param image - The key of an image in the Phaser.Cache to use as the texture for this line, or an actual Image. - * @param repeat - The pattern repeat mode to use when drawing the line. Either `repeat`, `repeat-x` or `no-repeat`. - Default: 'repeat-x' - * @return - This BitmapData object for method chaining. + * @param line A Phaser.Line object that will be used to plot the start and end of the line. + * @param image The key of an image in the Phaser.Cache to use as the texture for this line, or an actual Image. + * @param repeat The pattern repeat mode to use when drawing the line. Either `repeat`, `repeat-x` or `no-repeat`. - Default: 'repeat-x' + * @return This BitmapData object for method chaining. */ textureLine(line: Phaser.Line, key: string, repeat?: string): Phaser.BitmapData; @@ -1459,11 +1459,11 @@ declare module Phaser { * It then re-builds the ArrayBuffer, the data Uint8ClampedArray reference and the pixels Int32Array. * If not given the dimensions defaults to the full size of the context. * - * @param x - The x coordinate of the top-left of the image data area to grab from. - Default: 0 - * @param y - The y coordinate of the top-left of the image data area to grab from. - Default: 0 - * @param width - The width of the image data area. - * @param height - The height of the image data area. - * @return - This BitmapData object for method chaining. + * @param x The x coordinate of the top-left of the image data area to grab from. - Default: 0 + * @param y The y coordinate of the top-left of the image data area to grab from. - Default: 0 + * @param width The width of the image data area. + * @param height The height of the image data area. + * @return This BitmapData object for method chaining. */ update(x: number, y: number, width: number, height: number): Phaser.BitmapData; @@ -1487,12 +1487,12 @@ declare module Phaser { * On OS X we recommend Glyph Designer: http://www.71squared.com/en/glyphdesigner * For Web there is the great Littera: http://kvazars.com/littera/ * - * @param game - A reference to the currently running game. - * @param x - X position of the new bitmapText object. - * @param y - Y position of the new bitmapText object. - * @param font - The key of the BitmapFont as stored in Game.Cache. - * @param text - The actual text that will be rendered. Can be set later via BitmapText.text. - Default: '' - * @param size - The size the font will be rendered in, in pixels. - Default: 32 + * @param game A reference to the currently running game. + * @param x X position of the new bitmapText object. + * @param y Y position of the new bitmapText object. + * @param font The key of the BitmapFont as stored in Game.Cache. + * @param text The actual text that will be rendered. Can be set later via BitmapText.text. - Default: '' + * @param size The size the font will be rendered in, in pixels. - Default: 32 */ constructor(game: Phaser.Game, x: number, y: number, font: string, text?: string, size?: number); @@ -1602,7 +1602,7 @@ declare module Phaser { /** * Destroy this BitmapText instance. This will remove any filters and un-parent any children. * - * @param destroyChildren - Should every child of this object have its destroy method called? - Default: true + * @param destroyChildren Should every child of this object have its destroy method called? - Default: true */ destroy(destroyChildren?: boolean): void; @@ -1665,16 +1665,16 @@ declare module Phaser { * * Frames can be specified as either an integer (the frame ID) or a string (the frame name); the same values that can be used with a Sprite constructor. * - * @param game - Current game instance. - * @param x - X position of the Button. - Default: 0 - * @param y - Y position of the Button. - Default: 0 - * @param key - The image key (in the Game.Cache) to use as the texture for this Button. - * @param callback - The function to call when this Button is pressed. - * @param callbackContext - The context in which the callback will be called (usually 'this'). - * @param overFrame - The frame / frameName when the button is in the Over state. - * @param outFrame - The frame / frameName when the button is in the Out state. - * @param downFrame - The frame / frameName when the button is in the Down state. - * @param upFrame - The frame / frameName when the button is in the Up state. + * @param game Current game instance. + * @param x X position of the Button. - Default: 0 + * @param y Y position of the Button. - Default: 0 + * @param key The image key (in the Game.Cache) to use as the texture for this Button. + * @param callback The function to call when this Button is pressed. + * @param callbackContext The context in which the callback will be called (usually 'this'). + * @param overFrame The frame / frameName when the button is in the Over state. + * @param outFrame The frame / frameName when the button is in the Out state. + * @param downFrame The frame / frameName when the button is in the Down state. + * @param upFrame The frame / frameName when the button is in the Up state. */ constructor(game: Phaser.Game, x?: number, y?: number, key?: string, callback?: Function, callbackContext?: any, overFrame?: any, outFrame?: any, downFrame?: any, upFrame?: any); @@ -1768,16 +1768,16 @@ declare module Phaser { /** * The Sound to be played when a Pointer presses down on this Button. * - * @param sound - The Sound that will be played. - * @param marker - A Sound Marker that will be used in the playback. + * @param sound The Sound that will be played. + * @param marker A Sound Marker that will be used in the playback. */ setDownSound(sound: Phaser.Sound, marker?: string): void; /** * The Sound to be played when a Pointer presses down on this Button. * - * @param sound - The Sound that will be played. - * @param marker - A Sound Marker that will be used in the playback. + * @param sound The Sound that will be played. + * @param marker A Sound Marker that will be used in the playback. */ setDownSound(sound: Phaser.AudioSprite, marker?: string): void; @@ -1786,26 +1786,26 @@ declare module Phaser { * * Frames can be specified as either an integer (the frame ID) or a string (the frame name); these are the same values that can be used with a Sprite constructor. * - * @param overFrame - The frame / frameName when the button is in the Over state. - * @param outFrame - The frame / frameName when the button is in the Out state. - * @param downFrame - The frame / frameName when the button is in the Down state. - * @param upFrame - The frame / frameName when the button is in the Up state. + * @param overFrame The frame / frameName when the button is in the Over state. + * @param outFrame The frame / frameName when the button is in the Out state. + * @param downFrame The frame / frameName when the button is in the Down state. + * @param upFrame The frame / frameName when the button is in the Up state. */ setFrames(overFrame?: any, outFrame?: any, downFrame?: any, upFrame?: any): void; /** * Internal function that handles input events. * - * @param sprite - The Button that the event occured on. - * @param pointer - The Pointer that activated the Button. + * @param sprite The Button that the event occured on. + * @param pointer The Pointer that activated the Button. */ onInputDownHandler(sprite: Phaser.Button, pointer: Phaser.Pointer): void; /** * Internal function that handles input events. * - * @param sprite - The Button that the event occured on. - * @param pointer - The Pointer that activated the Button. + * @param sprite The Button that the event occured on. + * @param pointer The Pointer that activated the Button. */ onInputUpHandler(sprite: Phaser.Button, pointer: Phaser.Pointer, isOver: boolean): void; @@ -1817,32 +1817,32 @@ declare module Phaser { /** * The Sound to be played when a Pointer moves out of this Button. * - * @param sound - The Sound that will be played. - * @param marker - A Sound Marker that will be used in the playback. + * @param sound The Sound that will be played. + * @param marker A Sound Marker that will be used in the playback. */ setOutSound(sound: Phaser.Sound, marker?: string): void; /** * The Sound to be played when a Pointer moves out of this Button. * - * @param sound - The Sound that will be played. - * @param marker - A Sound Marker that will be used in the playback. + * @param sound The Sound that will be played. + * @param marker A Sound Marker that will be used in the playback. */ setOutSound(sound: Phaser.AudioSprite, marker?: string): void; /** * The Sound to be played when a Pointer moves over this Button. * - * @param sound - The Sound that will be played. - * @param marker - A Sound Marker that will be used in the playback. + * @param sound The Sound that will be played. + * @param marker A Sound Marker that will be used in the playback. */ setOverSound(sound: Phaser.Sound, marker?: string): void; /** * The Sound to be played when a Pointer moves over this Button. * - * @param sound - The Sound that will be played. - * @param marker - A Sound Marker that will be used in the playback. + * @param sound The Sound that will be played. + * @param marker A Sound Marker that will be used in the playback. */ setOverSound(sound: Phaser.AudioSprite, marker?: string): void; @@ -1852,14 +1852,14 @@ declare module Phaser { * * Call this function with no parameters to reset all sounds on this Button. * - * @param overSound - Over Button Sound. - * @param overMarker - Over Button Sound Marker. - * @param downSound - Down Button Sound. - * @param downMarker - Down Button Sound Marker. - * @param outSound - Out Button Sound. - * @param outMarker - Out Button Sound Marker. - * @param upSound - Up Button Sound. - * @param upMarker - Up Button Sound Marker. + * @param overSound Over Button Sound. + * @param overMarker Over Button Sound Marker. + * @param downSound Down Button Sound. + * @param downMarker Down Button Sound Marker. + * @param outSound Out Button Sound. + * @param outMarker Out Button Sound Marker. + * @param upSound Up Button Sound. + * @param upMarker Up Button Sound Marker. */ setSounds(overSound?: Phaser.Sound, overMarker?: string, downSound?: Phaser.Sound, downMarker?: string, outSound?: Phaser.Sound, outMarker?: string, upSound?: Phaser.Sound, upMarker?: string): void; @@ -1869,14 +1869,14 @@ declare module Phaser { * * Call this function with no parameters to reset all sounds on this Button. * - * @param overSound - Over Button Sound. - * @param overMarker - Over Button Sound Marker. - * @param downSound - Down Button Sound. - * @param downMarker - Down Button Sound Marker. - * @param outSound - Out Button Sound. - * @param outMarker - Out Button Sound Marker. - * @param upSound - Up Button Sound. - * @param upMarker - Up Button Sound Marker. + * @param overSound Over Button Sound. + * @param overMarker Over Button Sound Marker. + * @param downSound Down Button Sound. + * @param downMarker Down Button Sound Marker. + * @param outSound Out Button Sound. + * @param outMarker Out Button Sound Marker. + * @param upSound Up Button Sound. + * @param upMarker Up Button Sound Marker. */ setSounds(overSound?: Phaser.AudioSprite, overMarker?: string, downSound?: Phaser.AudioSprite, downMarker?: string, outSound?: Phaser.AudioSprite, outMarker?: string, upSound?: Phaser.AudioSprite, upMarker?: string): void; setState(newState: number): void; @@ -1884,16 +1884,16 @@ declare module Phaser { /** * The Sound to be played when a Pointer has pressed down and is released from this Button. * - * @param sound - The Sound that will be played. - * @param marker - A Sound Marker that will be used in the playback. + * @param sound The Sound that will be played. + * @param marker A Sound Marker that will be used in the playback. */ setUpSound(sound: Phaser.Sound, marker?: string): void; /** * The Sound to be played when a Pointer has pressed down and is released from this Button. * - * @param sound - The Sound that will be played. - * @param marker - A Sound Marker that will be used in the playback. + * @param sound The Sound that will be played. + * @param marker A Sound Marker that will be used in the playback. */ setUpSound(sound: Phaser.AudioSprite, marker?: string): void; @@ -1911,7 +1911,7 @@ declare module Phaser { * A game only has one instance of a Cache and it is used to store all externally loaded assets such as images, sounds * and data files as a result of Loader calls. Cached items use string based keys for look-up. * - * @param game - A reference to the currently running game. + * @param game A reference to the currently running game. */ constructor(game: Phaser.Game); @@ -1948,51 +1948,51 @@ declare module Phaser { /** * Add a binary object in to the cache. * - * @param key - Asset key for this binary data. - * @param binaryData - The binary object to be addded to the cache. + * @param key Asset key for this binary data. + * @param binaryData The binary object to be addded to the cache. */ addBinary(key: string, binaryData: any): void; /** * Add a BitmapData object to the cache. * - * @param key - Asset key for this BitmapData. - * @param bitmapData - The BitmapData object to be addded to the cache. - * @param frameData - Optional FrameData set associated with the given BitmapData. If not specified (or `undefined`) a new FrameData object is created containing the Bitmap's Frame. If `null` is supplied then no FrameData will be created. - Default: (auto create) - * @return - The BitmapData object to be addded to the cache. + * @param key Asset key for this BitmapData. + * @param bitmapData The BitmapData object to be addded to the cache. + * @param frameData Optional FrameData set associated with the given BitmapData. If not specified (or `undefined`) a new FrameData object is created containing the Bitmap's Frame. If `null` is supplied then no FrameData will be created. - Default: (auto create) + * @return The BitmapData object to be addded to the cache. */ addBitmapData(key: string, bitmapData: Phaser.BitmapData, frameData?: Phaser.FrameData): Phaser.BitmapData; /** * Add a new Bitmap Font to the Cache. * - * @param key - The unique key by which you will reference this object. - * @param url - URL of this font xml file. - * @param data - Extra font data. - * @param xmlData - Texture atlas frames data. - * @param xSpacing - If you'd like to add additional horizontal spacing between the characters then set the pixel value here. - Default: 0 - * @param ySpacing - If you'd like to add additional vertical spacing between the lines then set the pixel value here. - Default: 0 + * @param key The unique key by which you will reference this object. + * @param url URL of this font xml file. + * @param data Extra font data. + * @param xmlData Texture atlas frames data. + * @param xSpacing If you'd like to add additional horizontal spacing between the characters then set the pixel value here. - Default: 0 + * @param ySpacing If you'd like to add additional vertical spacing between the lines then set the pixel value here. - Default: 0 */ addBitmapFont(key: string, texture: Phaser.RetroFont): void; /** * Add a new Bitmap Font to the Cache. * - * @param key - The unique key by which you will reference this object. - * @param url - URL of this font xml file. - * @param data - Extra font data. - * @param xmlData - Texture atlas frames data. - * @param xSpacing - If you'd like to add additional horizontal spacing between the characters then set the pixel value here. - Default: 0 - * @param ySpacing - If you'd like to add additional vertical spacing between the lines then set the pixel value here. - Default: 0 + * @param key The unique key by which you will reference this object. + * @param url URL of this font xml file. + * @param data Extra font data. + * @param xmlData Texture atlas frames data. + * @param xSpacing If you'd like to add additional horizontal spacing between the characters then set the pixel value here. - Default: 0 + * @param ySpacing If you'd like to add additional vertical spacing between the lines then set the pixel value here. - Default: 0 */ addBitmapFont(key: string, url: string, data: any, xmlData: any, xSpacing?: number, ySpacing?: number): void; /** * Add a new canvas object in to the cache. * - * @param key - Asset key for this canvas. - * @param canvas - Canvas DOM element. - * @param context - Render context of this canvas. + * @param key Asset key for this canvas. + * @param canvas Canvas DOM element. + * @param context Render context of this canvas. */ addCanvas(key: string, canvas: HTMLCanvasElement, context: CanvasRenderingContext2D): void; @@ -2004,18 +2004,18 @@ declare module Phaser { /** * Adds an Image file into the Cache. The file must have already been loaded, typically via Phaser.Loader, but can also have been loaded into the DOM. * - * @param key - The unique key by which you will reference this object. - * @param url - URL of this image file. - * @param data - Extra image data. + * @param key The unique key by which you will reference this object. + * @param url URL of this image file. + * @param data Extra image data. */ addImage(key: string, url: string, data: any): void; /** * Add a new json object into the cache. * - * @param key - Asset key for the json data. - * @param url - URL of this json data file. - * @param data - Extra json data. + * @param key Asset key for the json data. + * @param url URL of this json data file. + * @param data Extra json data. */ addJSON(key: string, urL: string, data: any): void; addMisingImage(): void; @@ -2023,179 +2023,179 @@ declare module Phaser { /** * Add a new physics data object to the Cache. * - * @param key - The unique key by which you will reference this object. - * @param url - URL of the physics json data. - * @param JSONData - The physics data object (a JSON file). - * @param format - The format of the physics data. + * @param key The unique key by which you will reference this object. + * @param url URL of the physics json data. + * @param JSONData The physics data object (a JSON file). + * @param format The format of the physics data. */ addPhysicsData(key: string, url: string, JSONData: any, format: number): void; /** * Add a new Phaser.RenderTexture in to the cache. * - * @param key - The unique key by which you will reference this object. - * @param texture - The texture to use as the base of the RenderTexture. + * @param key The unique key by which you will reference this object. + * @param texture The texture to use as the base of the RenderTexture. */ addRenderTexture(key: string, texture: RenderTexture): void; /** * Adds a Sound file into the Cache. The file must have already been loaded, typically via Phaser.Loader. * - * @param key - Asset key for the sound. - * @param url - URL of this sound file. - * @param data - Extra sound data. - * @param webAudio - True if the file is using web audio. - * @param audioTag - True if the file is using legacy HTML audio. + * @param key Asset key for the sound. + * @param url URL of this sound file. + * @param data Extra sound data. + * @param webAudio True if the file is using web audio. + * @param audioTag True if the file is using legacy HTML audio. */ addSound(key: string, url: string, data: any, webAudio: boolean, audioTag: boolean): void; /** * Add a new sprite sheet in to the cache. * - * @param key - The unique key by which you will reference this object. - * @param url - URL of this sprite sheet file. - * @param data - Extra sprite sheet data. - * @param frameWidth - Width of the sprite sheet. - * @param frameHeight - Height of the sprite sheet. - * @param frameMax - How many frames stored in the sprite sheet. If -1 then it divides the whole sheet evenly. - Default: -1 - * @param margin - If the frames have been drawn with a margin, specify the amount here. - Default: 0 - * @param spacing - If the frames have been drawn with spacing between them, specify the amount here. - Default: 0 + * @param key The unique key by which you will reference this object. + * @param url URL of this sprite sheet file. + * @param data Extra sprite sheet data. + * @param frameWidth Width of the sprite sheet. + * @param frameHeight Height of the sprite sheet. + * @param frameMax How many frames stored in the sprite sheet. If -1 then it divides the whole sheet evenly. - Default: -1 + * @param margin If the frames have been drawn with a margin, specify the amount here. - Default: 0 + * @param spacing If the frames have been drawn with spacing between them, specify the amount here. - Default: 0 */ addSpriteSheet(key: string, url: string, data: any, frameWidth: number, frameHeight: number, frameMax?: number, margin?: number, spacing?: number): void; /** * Add a new text data. * - * @param key - Asset key for the text data. - * @param url - URL of this text data file. - * @param data - Extra text data. + * @param key Asset key for the text data. + * @param url URL of this text data file. + * @param data Extra text data. */ addText(key: string, url: string, data: any): void; /** * Add a new texture atlas to the Cache. * - * @param key - The unique key by which you will reference this object. - * @param url - URL of this texture atlas file. - * @param data - Extra texture atlas data. - * @param atlasData - Texture atlas frames data. - * @param format - The format of the texture atlas. + * @param key The unique key by which you will reference this object. + * @param url URL of this texture atlas file. + * @param data Extra texture atlas data. + * @param atlasData Texture atlas frames data. + * @param format The format of the texture atlas. */ addTextureAtlas(key: string, url: string, data: any, atlasData: any, format: number): void; /** * Add a new tilemap to the Cache. * - * @param key - The unique key by which you will reference this object. - * @param url - URL of the tilemap image. - * @param mapData - The tilemap data object (either a CSV or JSON file). - * @param format - The format of the tilemap data. + * @param key The unique key by which you will reference this object. + * @param url URL of the tilemap image. + * @param mapData The tilemap data object (either a CSV or JSON file). + * @param format The format of the tilemap data. */ addTilemap(key: string, url: string, mapData: any, format: number): void; /** * Add a new xml object into the cache. * - * @param key - Asset key for the xml file. - * @param url - URL of this xml file. - * @param data - Extra text data. + * @param key Asset key for the xml file. + * @param url URL of this xml file. + * @param data Extra text data. */ addXML(key: string, url: string, data: any): void; /** * Checks if the given key exists in the Binary Cache. * - * @param key - Asset key of the binary file to check is in the Cache. - * @return - True if the key exists, otherwise false. + * @param key Asset key of the binary file to check is in the Cache. + * @return True if the key exists, otherwise false. */ checkBinaryKey(key: string): boolean; /** * Checks if the given key exists in the BitmapData Cache. * - * @param key - Asset key of the BitmapData to check is in the Cache. - * @return - True if the key exists, otherwise false. + * @param key Asset key of the BitmapData to check is in the Cache. + * @return True if the key exists, otherwise false. */ checkBitmapDataKey(key: string): boolean; /** * Checks if the given key exists in the BitmapFont Cache. * - * @param key - Asset key of the BitmapFont to check is in the Cache. - * @return - True if the key exists, otherwise false. + * @param key Asset key of the BitmapFont to check is in the Cache. + * @return True if the key exists, otherwise false. */ checkBitmapFontKey(key: string): boolean; /** * Checks if the given key exists in the Canvas Cache. * - * @param key - Asset key of the canvas to check is in the Cache. - * @return - True if the key exists, otherwise false. + * @param key Asset key of the canvas to check is in the Cache. + * @return True if the key exists, otherwise false. */ checkCanvasKey(key: string): boolean; /** * Checks if the given key exists in the Image Cache. Note that this also includes Texture Atlases, Sprite Sheets and Retro Fonts. * - * @param key - Asset key of the image to check is in the Cache. - * @return - True if the key exists, otherwise false. + * @param key Asset key of the image to check is in the Cache. + * @return True if the key exists, otherwise false. */ checkImageKey(key: string): boolean; /** * Checks if the given key exists in the JSON Cache. * - * @param key - Asset key of the JSON file to check is in the Cache. - * @return - True if the key exists, otherwise false. + * @param key Asset key of the JSON file to check is in the Cache. + * @return True if the key exists, otherwise false. */ checkJSONKey(key: string): boolean; /** * Checks if a key for the given cache object type exists. * - * @param type - The Cache type to check against. I.e. Phaser.Cache.CANVAS, Phaser.Cache.IMAGE, Phaser.Cache.JSON, etc. - * @param key - Asset key of the image to check is in the Cache. - * @return - True if the key exists, otherwise false. + * @param type The Cache type to check against. I.e. Phaser.Cache.CANVAS, Phaser.Cache.IMAGE, Phaser.Cache.JSON, etc. + * @param key Asset key of the image to check is in the Cache. + * @return True if the key exists, otherwise false. */ checkKey(type: number, key: string): boolean; /** * Checks if the given key exists in the Physics Cache. * - * @param key - Asset key of the physics data file to check is in the Cache. - * @return - True if the key exists, otherwise false. + * @param key Asset key of the physics data file to check is in the Cache. + * @return True if the key exists, otherwise false. */ checkPhysicsKey(key: string): boolean; /** * Checks if the given key exists in the Sound Cache. * - * @param key - Asset key of the sound file to check is in the Cache. - * @return - True if the key exists, otherwise false. + * @param key Asset key of the sound file to check is in the Cache. + * @return True if the key exists, otherwise false. */ checkSoundKey(key: string): boolean; /** * Checks if the given key exists in the Text Cache. * - * @param key - Asset key of the text file to check is in the Cache. - * @return - True if the key exists, otherwise false. + * @param key Asset key of the text file to check is in the Cache. + * @return True if the key exists, otherwise false. */ checkTextKey(key: string): boolean; /** * Checks if the given key exists in the Texture Cache. * - * @param key - Asset key of the image to check is in the Cache. - * @return - True if the key exists, otherwise false. + * @param key Asset key of the image to check is in the Cache. + * @return True if the key exists, otherwise false. */ checkTextureKey(key: string): boolean; /** * Checks if the given key exists in the Tilemap Cache. * - * @param key - Asset key of the Tilemap to check is in the Cache. - * @return - True if the key exists, otherwise false. + * @param key Asset key of the Tilemap to check is in the Cache. + * @return True if the key exists, otherwise false. */ checkTilemapKey(key: string): boolean; @@ -2205,8 +2205,8 @@ declare module Phaser { * The method will make a DOM src call to the URL given, so please be aware of this for certain file types, such as Sound files on Firefox * which may cause double-load instances. * - * @param url - The url to check for in the cache. - * @return - True if the url exists, otherwise false. + * @param url The url to check for in the cache. + * @return True if the url exists, otherwise false. */ checkURL(url: string): any; checkUrl(url: string): any; @@ -2214,16 +2214,16 @@ declare module Phaser { /** * Checks if the given key exists in the XML Cache. * - * @param key - Asset key of the XML file to check is in the Cache. - * @return - True if the key exists, otherwise false. + * @param key Asset key of the XML file to check is in the Cache. + * @return True if the key exists, otherwise false. */ checkXMLKey(key: string): boolean; /** * Add a new decoded sound. * - * @param key - Asset key for the sound. - * @param data - Extra sound data. + * @param key Asset key for the sound. + * @param data Extra sound data. */ decodedSound(key: string, data: any): void; @@ -2235,139 +2235,139 @@ declare module Phaser { /** * Get binary data by key. * - * @param key - Asset key of the binary data object to retrieve from the Cache. - * @return - The binary data object. + * @param key Asset key of the binary data object to retrieve from the Cache. + * @return The binary data object. */ getBinary(key: string): any; /** * Get a BitmapData object from the cache by its key. * - * @param key - Asset key of the BitmapData object to retrieve from the Cache. - * @return - The requested BitmapData object if found, or null if not. + * @param key Asset key of the BitmapData object to retrieve from the Cache. + * @return The requested BitmapData object if found, or null if not. */ getBitmapData(key: string): Phaser.BitmapData; /** * Get a BitmapFont object from the cache by its key. * - * @param key - Asset key of the BitmapFont object to retrieve from the Cache. - * @return - The requested BitmapFont object if found, or null if not. + * @param key Asset key of the BitmapFont object to retrieve from the Cache. + * @return The requested BitmapFont object if found, or null if not. */ getBitmapFont(key: string): Phaser.RetroFont; /** * Get a canvas object from the cache by its key. * - * @param key - Asset key of the canvas to retrieve from the Cache. - * @return - The canvas object. + * @param key Asset key of the canvas to retrieve from the Cache. + * @return The canvas object. */ getCanvas(key: string): any; /** * Get a single frame by key. You'd only do this to get the default Frame created for a non-atlas/spritesheet image. * - * @param key - Asset key of the frame data to retrieve from the Cache. - * @return - The frame data. + * @param key Asset key of the frame data to retrieve from the Cache. + * @return The frame data. */ getFrame(key: string): Phaser.Frame; /** * Get a single frame out of a frameData set by key. * - * @param key - Asset key of the frame data to retrieve from the Cache. - * @return - The frame object. + * @param key Asset key of the frame data to retrieve from the Cache. + * @return The frame object. */ getFrameByIndex(key: string, frame: string): Phaser.Frame; /** * Get a single frame out of a frameData set by key. * - * @param key - Asset key of the frame data to retrieve from the Cache. - * @return - The frame object. + * @param key Asset key of the frame data to retrieve from the Cache. + * @return The frame object. */ getFrameByName(key: string, frame: string): Phaser.Frame; /** * Get the number of frames in this image. * - * @param key - Asset key of the image you want. - * @return - Then number of frames. 0 if the image is not found. + * @param key Asset key of the image you want. + * @return Then number of frames. 0 if the image is not found. */ getFrameCount(key: string): number; /** * Get frame data by key. * - * @param key - Asset key of the frame data to retrieve from the Cache. - * @param map - The asset map to get the frameData from, for example `Phaser.Cache.IMAGE`. - Default: Phaser.Cache.IMAGE - * @return - The frame data. + * @param key Asset key of the frame data to retrieve from the Cache. + * @param map The asset map to get the frameData from, for example `Phaser.Cache.IMAGE`. - Default: Phaser.Cache.IMAGE + * @return The frame data. */ getFrameData(key: string, map?: string): Phaser.FrameData; /** * Gets an image by its key. Note that this returns a DOM Image object, not a Phaser object. * - * @param key - Asset key of the image to retrieve from the Cache. - * @return - The Image object if found in the Cache, otherwise `null`. + * @param key Asset key of the image to retrieve from the Cache. + * @return The Image object if found in the Cache, otherwise `null`. */ getImage(key: string): Phaser.Image; /** * Get a JSON object by key from the cache. * - * @param key - Asset key of the json object to retrieve from the Cache. - * @return - The JSON object. + * @param key Asset key of the json object to retrieve from the Cache. + * @return The JSON object. */ getJSON(key: string): any; /** * Gets all keys used by the Cache for the given data type. * - * @param type - The type of Cache keys you wish to get. Can be Cache.CANVAS, Cache.IMAGE, Cache.SOUND, etc. - Default: Phaser.Cache.IMAGE - * @return - The array of item keys. + * @param type The type of Cache keys you wish to get. Can be Cache.CANVAS, Cache.IMAGE, Cache.SOUND, etc. - Default: Phaser.Cache.IMAGE + * @return The array of item keys. */ getKeys(array: string[]): string[]; /** * Get a physics data object from the cache by its key. You can get either the entire data set, a single object or a single fixture of an object from it. * - * @param key - Asset key of the physics data object to retrieve from the Cache. - * @param object - If specified it will return just the physics object that is part of the given key, if null it will return them all. - Default: null - * @param fixtureKey - Fixture key of fixture inside an object. This key can be set per fixture with the Phaser Exporter. - * @return - The requested physics object data if found. + * @param key Asset key of the physics data object to retrieve from the Cache. + * @param object If specified it will return just the physics object that is part of the given key, if null it will return them all. - Default: null + * @param fixtureKey Fixture key of fixture inside an object. This key can be set per fixture with the Phaser Exporter. + * @return The requested physics object data if found. */ getPhysicsData(key: string, object?: string, fixtureKey?: string): any[]; /** * Get a RenderTexture by key. * - * @param key - Asset key of the RenderTexture to retrieve from the Cache. - * @return - The RenderTexture object. + * @param key Asset key of the RenderTexture to retrieve from the Cache. + * @return The RenderTexture object. */ getRenderTexture(key: string): Phaser.RenderTexture; /** * Get sound by key. * - * @param key - Asset key of the sound to retrieve from the Cache. - * @return - The sound object. + * @param key Asset key of the sound to retrieve from the Cache. + * @return The sound object. */ getSound(key: string): Phaser.Sound; /** * Get sound data by key. * - * @param key - Asset key of the sound to retrieve from the Cache. - * @return - The sound data. + * @param key Asset key of the sound to retrieve from the Cache. + * @return The sound data. */ getSoundData(key: string): any; /** * Get text data by key. * - * @param key - Asset key of the text data to retrieve from the Cache. - * @return - The text data. + * @param key Asset key of the text data to retrieve from the Cache. + * @return The text data. */ getText(key: string): string; getTextKeys(): string[]; @@ -2377,16 +2377,16 @@ declare module Phaser { * * Get a RenderTexture by key. * - * @param key - Asset key of the RenderTexture to retrieve from the Cache. - * @return - The RenderTexture object. + * @param key Asset key of the RenderTexture to retrieve from the Cache. + * @return The RenderTexture object. */ getTexture(key: string): Phaser.RenderTexture; /** * Get a single texture frame by key. You'd only do this to get the default Frame created for a non-atlas/spritesheet image. * - * @param key - Asset key of the frame to retrieve from the Cache. - * @return - The frame data. + * @param key Asset key of the frame to retrieve from the Cache. + * @return The frame data. */ getTextureFrame(key: string): Phaser.Frame; getTilemap(key: string): any; @@ -2394,8 +2394,8 @@ declare module Phaser { /** * Get tilemap data by key. * - * @param key - Asset key of the tilemap data to retrieve from the Cache. - * @return - The raw tilemap data in CSV or JSON format. + * @param key Asset key of the tilemap data to retrieve from the Cache. + * @return The raw tilemap data in CSV or JSON format. */ getTilemapData(key: string): any; @@ -2404,8 +2404,8 @@ declare module Phaser { * This only returns a value if you set Cache.autoResolveURL to `true` *before* starting the preload of any assets. * Be aware that every call to this function makes a DOM src query, so use carefully and double-check for implications in your target browsers/devices. * - * @param url - The url for the object loaded to get from the cache. - * @return - The cached object. + * @param url The url for the object loaded to get from the cache. + * @return The cached object. */ getURL(url: string): any; @@ -2415,32 +2415,32 @@ declare module Phaser { * This only returns a value if you set Cache.autoResolveURL to `true` *before* starting the preload of any assets. * Be aware that every call to this function makes a DOM src query, so use carefully and double-check for implications in your target browsers/devices. * - * @param url - The url for the object loaded to get from the cache. - * @return - The cached object. + * @param url The url for the object loaded to get from the cache. + * @return The cached object. */ getUrl(url: string): any; /** * Get a XML object by key from the cache. * - * @param key - Asset key of the XML object to retrieve from the Cache. - * @return - The XML object. + * @param key Asset key of the XML object to retrieve from the Cache. + * @return The XML object. */ getXML(key: string): any; /** * Check if the given sound has finished decoding. * - * @param key - Asset key of the sound in the Cache. - * @return - The decoded state of the Sound object. + * @param key Asset key of the sound in the Cache. + * @return The decoded state of the Sound object. */ isSoundDecoded(key: string): boolean; /** * Check if the given sound is ready for playback. A sound is considered ready when it has finished decoding and the device is no longer touch locked. * - * @param key - Asset key of the sound in the Cache. - * @return - True if the sound is decoded and the device is not touch locked. + * @param key Asset key of the sound in the Cache. + * @return True if the sound is decoded and the device is not touch locked. */ isSoundReady(key: string): boolean; isSpriteSheet(key: string): boolean; @@ -2448,107 +2448,107 @@ declare module Phaser { /** * Reload a Sound file from the server. * - * @param key - Asset key for the sound. + * @param key Asset key for the sound. */ reloadSound(key: string): void; /** * Fires the onSoundUnlock event when the sound has completed reloading. * - * @param key - Asset key for the sound. + * @param key Asset key for the sound. */ reloadSoundComplete(key: string): void; /** * Removes a binary file from the cache. * - * @param key - Key of the asset you want to remove. + * @param key Key of the asset you want to remove. */ removeBinary(key: string): void; /** * Removes a bitmap data from the cache. * - * @param key - Key of the asset you want to remove. + * @param key Key of the asset you want to remove. */ removeBitmapData(key: string): void; /** * Removes a bitmap font from the cache. * - * @param key - Key of the asset you want to remove. + * @param key Key of the asset you want to remove. */ removeBitmapFont(key: string): void; /** * Removes a canvas from the cache. * - * @param key - Key of the asset you want to remove. + * @param key Key of the asset you want to remove. */ removeCanvas(key: string): void; /** * Removes an image from the cache and optionally from the Pixi.BaseTextureCache as well. * - * @param key - Key of the asset you want to remove. - * @param removeFromPixi - Should this image also be removed from the Pixi BaseTextureCache? - Default: true + * @param key Key of the asset you want to remove. + * @param removeFromPixi Should this image also be removed from the Pixi BaseTextureCache? - Default: true */ removeImage(key: string, removeFromPixi?: boolean): void; /** * Removes a json object from the cache. * - * @param key - Key of the asset you want to remove. + * @param key Key of the asset you want to remove. */ removeJSON(key: string): void; /** * Removes a physics data file from the cache. * - * @param key - Key of the asset you want to remove. + * @param key Key of the asset you want to remove. */ removePhysics(key: string): void; /** * Removes a sound from the cache. * - * @param key - Key of the asset you want to remove. + * @param key Key of the asset you want to remove. */ removeSound(key: string): void; /** * Removes a text from the cache. * - * @param key - Key of the asset you want to remove. + * @param key Key of the asset you want to remove. */ removeText(key: string): void; /** * Removes a tilemap from the cache. * - * @param key - Key of the asset you want to remove. + * @param key Key of the asset you want to remove. */ removeTilemap(key: string): void; /** * Removes a xml object from the cache. * - * @param key - Key of the asset you want to remove. + * @param key Key of the asset you want to remove. */ removeXML(key: string): void; /** * Replaces a set of frameData with a new Phaser.FrameData object. * - * @param key - The unique key by which you will reference this object. - * @param frameData - The new FrameData. + * @param key The unique key by which you will reference this object. + * @param frameData The new FrameData. */ updateFrameData(key: string, frameData: any): void; /** * Updates the sound object in the cache. * - * @param key - Asset key for the sound. + * @param key Asset key for the sound. */ updateSound(key: string, property: string, value: Phaser.Sound): void; @@ -2566,12 +2566,12 @@ declare module Phaser { * A Camera is your view into the game world. It has a position and size and renders only those objects within its field of view. * The game automatically creates a single Stage sized camera on boot. Move the camera around the world with Phaser.Camera.x/y * - * @param game - Game reference to the currently running game. - * @param id - Not being used at the moment, will be when Phaser supports multiple camera - * @param x - Position of the camera on the X axis - * @param y - Position of the camera on the Y axis - * @param width - The width of the view rectangle - * @param height - The height of the view rectangle + * @param game Game reference to the currently running game. + * @param id Not being used at the moment, will be when Phaser supports multiple camera + * @param x Position of the camera on the X axis + * @param y Position of the camera on the Y axis + * @param width The width of the view rectangle + * @param height The height of the view rectangle */ constructor(game: Phaser.Game, id: number, x: number, y: number, width: number, height: number); @@ -2690,23 +2690,23 @@ declare module Phaser { /** * Move the camera focus on a display object instantly. * - * @param displayObject - The display object to focus the camera on. Must have visible x/y properties. + * @param displayObject The display object to focus the camera on. Must have visible x/y properties. */ focusOn(displayObject: any): void; /** * Move the camera focus on a location instantly. * - * @param x - X position. - * @param y - Y position. + * @param x X position. + * @param y Y position. */ focusOnXY(x: number, y: number): void; /** * Tells this camera which sprite to follow. * - * @param target - The object you want the camera to track. Set to null to not follow anything. - * @param style - Leverage one of the existing "deadzone" presets. If you use a custom deadzone, ignore this parameter and manually specify the deadzone after calling follow(). + * @param target The object you want the camera to track. Set to null to not follow anything. + * @param style Leverage one of the existing "deadzone" presets. If you use a custom deadzone, ignore this parameter and manually specify the deadzone after calling follow(). */ follow(target: Phaser.Sprite, style?: number): void; @@ -2724,16 +2724,16 @@ declare module Phaser { * A helper function to set both the X and Y properties of the camera at once * without having to use game.camera.x and game.camera.y. * - * @param x - X position. - * @param y - Y position. + * @param x X position. + * @param y Y position. */ setPosition(x: number, y: number): void; /** * Sets the size of the view rectangle given the width and height in parameters. * - * @param width - The desired width. - * @param height - The desired height. + * @param width The desired width. + * @param height The desired height. */ setSize(width: number, height: number): void; @@ -2755,37 +2755,37 @@ declare module Phaser { * Adds the given canvas element to the DOM. The canvas will be added as a child of the given parent. * If no parent is given it will be added as a child of the document.body. * - * @param canvas - The canvas to be added to the DOM. - * @param parent - The DOM element to add the canvas to. - * @param overflowHidden - If set to true it will add the overflow='hidden' style to the parent DOM element. - Default: true - * @return - Returns the source canvas. + * @param canvas The canvas to be added to the DOM. + * @param parent The DOM element to add the canvas to. + * @param overflowHidden If set to true it will add the overflow='hidden' style to the parent DOM element. - Default: true + * @return Returns the source canvas. */ static addToDOM(canvas: HTMLCanvasElement, parent: any, overflowHidden?: boolean): HTMLCanvasElement; /** * Creates a `canvas` DOM element. The element is not automatically added to the document. * - * @param width - The width of the canvas element. - Default: 256 - * @param height - The height of the canvas element.. - Default: 256 - * @param id - If specified, and not the empty string, this will be set as the ID of the canvas element. Otherwise no ID will be set. - Default: (none) - * @return - The newly created canvas element. + * @param width The width of the canvas element. - Default: 256 + * @param height The height of the canvas element.. - Default: 256 + * @param id If specified, and not the empty string, this will be set as the ID of the canvas element. Otherwise no ID will be set. - Default: (none) + * @return The newly created canvas element. */ static create(width?: number, height?: number, id?: string): HTMLCanvasElement; /** * Returns the aspect ratio of the given canvas. * - * @param canvas - The canvas to get the aspect ratio from. - * @return - The ratio between canvas' width and height. + * @param canvas The canvas to get the aspect ratio from. + * @return The ratio between canvas' width and height. */ static getAspectRatio(canvas: HTMLCanvasElement): number; /** * Get the DOM offset values of any given element * - * @param element - The targeted element that we want to retrieve the offset. - * @param point - The point we want to take the x/y values of the offset. - * @return - - A point objet with the offsetX and Y as its properties. + * @param element The targeted element that we want to retrieve the offset. + * @param point The point we want to take the x/y values of the offset. + * @return - A point objet with the offsetX and Y as its properties. */ static getOffset(element: HTMLElement, point?: Phaser.Point): Phaser.Point; static getSmoothngEnabled(context: CanvasRenderingContext2D): boolean; @@ -2793,16 +2793,16 @@ declare module Phaser { /** * Removes the given canvas element from the DOM. * - * @param canvas - The canvas to be removed from the DOM. + * @param canvas The canvas to be removed from the DOM. */ static removeFromDOM(canvas: HTMLCanvasElement): void; /** * Sets the background color behind the canvas. This changes the canvas style property. * - * @param canvas - The canvas to set the background color on. - * @param color - The color to set. Can be in the format 'rgb(r,g,b)', or '#RRGGBB' or any valid CSS color. - * @return - Returns the source canvas. + * @param canvas The canvas to set the background color on. + * @param color The color to set. Can be in the format 'rgb(r,g,b)', or '#RRGGBB' or any valid CSS color. + * @return Returns the source canvas. */ static setBackgroundColor(canvas: HTMLCanvasElement, color: string): HTMLCanvasElement; @@ -2810,8 +2810,8 @@ declare module Phaser { * Sets the CSS image-rendering property on the given canvas to be 'bicubic' (aka 'auto'). * Note that if this doesn't given the desired result then see the CanvasUtils.setSmoothingEnabled method. * - * @param canvas - The canvas to set image-rendering bicubic on. - * @return - Returns the source canvas. + * @param canvas The canvas to set image-rendering bicubic on. + * @return Returns the source canvas. */ static setImageRenderingBicubic(canvas: HTMLCanvasElement): HTMLCanvasElement; @@ -2819,8 +2819,8 @@ declare module Phaser { * Sets the CSS image-rendering property on the given canvas to be 'crisp' (aka 'optimize contrast' on webkit). * Note that if this doesn't given the desired result then see the setSmoothingEnabled. * - * @param canvas - The canvas to set image-rendering crisp on. - * @return - Returns the source canvas. + * @param canvas The canvas to set image-rendering crisp on. + * @return Returns the source canvas. */ static setImageRenderingCrisp(canvas: HTMLCanvasElement): HTMLCanvasElement; @@ -2831,41 +2831,41 @@ declare module Phaser { * drawn to the context will be affected. This sets the property across all current browsers but support is * patchy on earlier browsers, especially on mobile. * - * @param context - The context to enable or disable the image smoothing on. - * @param value - If set to true it will enable image smoothing, false will disable it. - * @return - Returns the source context. + * @param context The context to enable or disable the image smoothing on. + * @param value If set to true it will enable image smoothing, false will disable it. + * @return Returns the source context. */ static setSmoothingEnabled(context: CanvasRenderingContext2D, value: boolean): CanvasRenderingContext2D; /** * Sets the touch-action property on the canvas style. Can be used to disable default browser touch actions. * - * @param canvas - The canvas to set the touch action on. - * @param value - The touch action to set. Defaults to 'none'. - * @return - The source canvas. + * @param canvas The canvas to set the touch action on. + * @param value The touch action to set. Defaults to 'none'. + * @return The source canvas. */ static setTouchAction(canvas: HTMLCanvasElement, value: string): HTMLCanvasElement; /** * Sets the transform of the given canvas to the matrix values provided. * - * @param context - The context to set the transform on. - * @param translateX - The value to translate horizontally by. - * @param translateY - The value to translate vertically by. - * @param scaleX - The value to scale horizontally by. - * @param scaleY - The value to scale vertically by. - * @param skewX - The value to skew horizontaly by. - * @param skewY - The value to skew vertically by. - * @return - Returns the source context. + * @param context The context to set the transform on. + * @param translateX The value to translate horizontally by. + * @param translateY The value to translate vertically by. + * @param scaleX The value to scale horizontally by. + * @param scaleY The value to scale vertically by. + * @param skewX The value to skew horizontaly by. + * @param skewY The value to skew vertically by. + * @return Returns the source context. */ static setTransform(context: CanvasRenderingContext2D, translateX: number, translateY: number, scaleX: number, scaleY: number, skewX: number, skewY: number): CanvasRenderingContext2D; /** * Sets the user-select property on the canvas style. Can be used to disable default browser selection actions. * - * @param canvas - The canvas to set the touch action on. - * @param value - The touch action to set. Defaults to 'none'. - * @return - The source canvas. + * @param canvas The canvas to set the touch action on. + * @param value The touch action to set. Defaults to 'none'. + * @return The source canvas. */ static setUserSelect(canvas: HTMLCanvasElement, value?: string): HTMLCanvasElement; @@ -2883,9 +2883,9 @@ declare module Phaser { * Creates a new Circle object with the center coordinate specified by the x and y parameters and the diameter specified by the diameter parameter. * If you call this function without parameters, a circle with x, y, diameter and radius properties set to 0 is created. * - * @param x - The x coordinate of the center of the circle. - Default: 0 - * @param y - The y coordinate of the center of the circle. - Default: 0 - * @param diameter - The diameter of the circle. - Default: 0 + * @param x The x coordinate of the center of the circle. - Default: 0 + * @param y The y coordinate of the center of the circle. - Default: 0 + * @param diameter The diameter of the circle. - Default: 0 */ constructor(x?: number, y?: number, diameter?: number); @@ -2945,28 +2945,28 @@ declare module Phaser { /** * Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle. * - * @param angle - The angle in radians (unless asDegrees is true) to return the point from. - * @param asDegrees - Is the given angle in radians (false) or degrees (true)? - Default: false - * @param out - An optional Point object to put the result in to. If none specified a new Point object will be created. - * @return - The Point object holding the result. + * @param angle The angle in radians (unless asDegrees is true) to return the point from. + * @param asDegrees Is the given angle in radians (false) or degrees (true)? - Default: false + * @param out An optional Point object to put the result in to. If none specified a new Point object will be created. + * @return The Point object holding the result. */ static circumferencePoint(a: Phaser.Circle, angle: number, asDegrees: boolean, out?: Phaser.Point): Phaser.Point; /** * Return true if the given x/y coordinates are within this Circle object. * - * @param x - The X value of the coordinate to test. - * @param y - The Y value of the coordinate to test. - * @return - True if the coordinates are within this circle, otherwise false. + * @param x The X value of the coordinate to test. + * @param y The Y value of the coordinate to test. + * @return True if the coordinates are within this circle, otherwise false. */ static contains(a: Phaser.Circle, x: number, y: number): boolean; /** * Determines whether the two Circle objects match. This method compares the x, y and diameter properties. * - * @param a - The first Circle object. - * @param b - The second Circle object. - * @return - A value of true if the object has exactly the same values for the x, y and diameter properties as this Circle object; otherwise false. + * @param a The first Circle object. + * @param b The second Circle object. + * @return A value of true if the object has exactly the same values for the x, y and diameter properties as this Circle object; otherwise false. */ static equals(a: Phaser.Circle, b: Phaser.Circle): boolean; @@ -2974,68 +2974,68 @@ declare module Phaser { * Determines whether the two Circle objects intersect. * This method checks the radius distances between the two Circle objects to see if they intersect. * - * @param a - The first Circle object. - * @param b - The second Circle object. - * @return - A value of true if the specified object intersects with this Circle object; otherwise false. + * @param a The first Circle object. + * @param b The second Circle object. + * @return A value of true if the specified object intersects with this Circle object; otherwise false. */ static intersects(a: Phaser.Circle, b: Phaser.Circle): boolean; /** * Checks if the given Circle and Rectangle objects intersect. * - * @param c - The Circle object to test. - * @param r - The Rectangle object to test. - * @return - True if the two objects intersect, otherwise false. + * @param c The Circle object to test. + * @param r The Rectangle object to test. + * @return True if the two objects intersect, otherwise false. */ static intersectsRectangle(c: Phaser.Circle, r: Phaser.Rectangle): boolean; /** * The circumference of the circle. - * @return - + * @return */ circumference(): number; /** * Returns a Point object containing the coordinates of a point on the circumference of the Circle based on the given angle. * - * @param angle - The angle in radians (unless asDegrees is true) to return the point from. - * @param asDegrees - Is the given angle in radians (false) or degrees (true)? - Default: false - * @param out - An optional Point object to put the result in to. If none specified a new Point object will be created. - * @return - The Point object holding the result. + * @param angle The angle in radians (unless asDegrees is true) to return the point from. + * @param asDegrees Is the given angle in radians (false) or degrees (true)? - Default: false + * @param out An optional Point object to put the result in to. If none specified a new Point object will be created. + * @return The Point object holding the result. */ circumferencePoint(angle: number, asDegrees?: boolean, out?: Phaser.Point): Phaser.Point; /** * Returns a new Circle object with the same values for the x, y, width, and height properties as this Circle object. * - * @param output - Optional Circle object. If given the values will be set into the object, otherwise a brand new Circle object will be created and returned. - * @return - The cloned Circle object. + * @param output Optional Circle object. If given the values will be set into the object, otherwise a brand new Circle object will be created and returned. + * @return The cloned Circle object. */ clone(output: Phaser.Circle): Phaser.Circle; /** * Return true if the given x/y coordinates are within this Circle object. * - * @param x - The X value of the coordinate to test. - * @param y - The Y value of the coordinate to test. - * @return - True if the coordinates are within this circle, otherwise false. + * @param x The X value of the coordinate to test. + * @param y The Y value of the coordinate to test. + * @return True if the coordinates are within this circle, otherwise false. */ contains(x: number, y: number): boolean; /** * Copies the x, y and diameter properties from any given object to this Circle. * - * @param source - The object to copy from. - * @return - This Circle object. + * @param source The object to copy from. + * @return This Circle object. */ copyFrom(source: any): Circle; /** * Copies the x, y and diameter properties from this Circle to any given object. * - * @param dest - The object to copy to. - * @return - This dest object. + * @param dest The object to copy to. + * @return This dest object. */ copyTo(dest: any): any; @@ -3043,32 +3043,32 @@ declare module Phaser { * Returns the distance from the center of the Circle object to the given object * (can be Circle, Point or anything with x/y properties) * - * @param dest - The target object. Must have visible x and y properties that represent the center of the object. - * @param round - Round the distance to the nearest integer. - Default: false - * @return - The distance between this Point object and the destination Point object. + * @param dest The target object. Must have visible x and y properties that represent the center of the object. + * @param round Round the distance to the nearest integer. - Default: false + * @return The distance between this Point object and the destination Point object. */ distance(dest: any, round?: boolean): number; /** * Returns the framing rectangle of the circle as a Phaser.Rectangle object - * @return - The bounds of the Circle. + * @return The bounds of the Circle. */ getBounds(): Phaser.Rectangle; /** * Adjusts the location of the Circle object, as determined by its center coordinate, by the specified amounts. * - * @param dx - Moves the x value of the Circle object by this amount. - * @param dy - Moves the y value of the Circle object by this amount. - * @return - This Circle object. + * @param dx Moves the x value of the Circle object by this amount. + * @param dy Moves the y value of the Circle object by this amount. + * @return This Circle object. */ offset(dx: number, dy: number): Phaser.Circle; /** * Adjusts the location of the Circle object using a Point object as a parameter. This method is similar to the Circle.offset() method, except that it takes a Point object as a parameter. * - * @param point - A Point object to use to offset this Circle object (or any valid object with exposed x and y properties). - * @return - This Circle object. + * @param point A Point object to use to offset this Circle object (or any valid object with exposed x and y properties). + * @return This Circle object. */ offsetPoint(point: Phaser.Point): Phaser.Circle; scale(x: number, y?: number): Phaser.Rectangle; @@ -3076,16 +3076,16 @@ declare module Phaser { /** * Sets the members of Circle to the specified values. * - * @param x - The x coordinate of the center of the circle. - * @param y - The y coordinate of the center of the circle. - * @param diameter - The diameter of the circle. - * @return - This circle object. + * @param x The x coordinate of the center of the circle. + * @param y The y coordinate of the center of the circle. + * @param diameter The diameter of the circle. + * @return This circle object. */ setTo(x: number, y: number, diameter: number): Circle; /** * Returns a string representation of this object. - * @return - a string representation of the instance. + * @return a string representation of the instance. */ toString(): string; @@ -3101,8 +3101,8 @@ declare module Phaser { /** * Return a string containing a hex representation of the given color component. * - * @param color - The color channel to get the hex value for, must be a value between 0 and 255. - * @return - A string of length 2 characters, i.e. 255 = ff, 100 = 64. + * @param color The color channel to get the hex value for, must be a value between 0 and 255. + * @return A string of length 2 characters, i.e. 255 = ff, 100 = 64. */ static componentToHex(color: number): string; @@ -3112,15 +3112,15 @@ declare module Phaser { * * This is useful when you want to use a shared color object for the getPixel and getPixelAt methods. * - * @param r - The red color component, in the range 0 - 255. - Default: 0 - * @param g - The green color component, in the range 0 - 255. - Default: 0 - * @param b - The blue color component, in the range 0 - 255. - Default: 0 - * @param a - The alpha color component, in the range 0 - 1. - Default: 1 - * @param h - The hue, in the range 0 - 1. - Default: 0 - * @param s - The saturation, in the range 0 - 1. - Default: 0 - * @param l - The lightness, in the range 0 - 1. - Default: 0 - * @param v - The value, in the range 0 - 1. - Default: 0 - * @return - The resulting object with r, g, b, a properties and h, s, l and v. + * @param r The red color component, in the range 0 - 255. - Default: 0 + * @param g The green color component, in the range 0 - 255. - Default: 0 + * @param b The blue color component, in the range 0 - 255. - Default: 0 + * @param a The alpha color component, in the range 0 - 1. - Default: 1 + * @param h The hue, in the range 0 - 1. - Default: 0 + * @param s The saturation, in the range 0 - 1. - Default: 0 + * @param l The lightness, in the range 0 - 1. - Default: 0 + * @param v The value, in the range 0 - 1. - Default: 0 + * @return The resulting object with r, g, b, a properties and h, s, l and v. */ static createColor(r?: number, g?: number, b?: number, a?: number, h?: number, s?: number, l?: number, v?: number): any; @@ -3128,62 +3128,62 @@ declare module Phaser { * A utility to convert an integer in 0xRRGGBBAA format to a color object. * This does not rely on endianness. * - * @param rgba - An RGBA hex - * @param out - The object to use, optional. - * @return - A color object. + * @param rgba An RGBA hex + * @param out The object to use, optional. + * @return A color object. */ static fromRGBA(rgba: number, out?: any): any; /** * Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component, as a value between 0 and 255. * - * @param color - In the format 0xAARRGGBB. - * @return - The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)). + * @param color In the format 0xAARRGGBB. + * @return The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)). */ static getAlpha(color: number): number; /** * Given a native color value (in the format 0xAARRGGBB) this will return the Alpha component as a value between 0 and 1. * - * @param color - In the format 0xAARRGGBB. - * @return - The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)). + * @param color In the format 0xAARRGGBB. + * @return The Alpha component of the color, will be between 0 and 1 (0 being no Alpha (opaque), 1 full Alpha (transparent)). */ static getAlphaFloat(color: number): number; /** * Given a native color value (in the format 0xAARRGGBB) this will return the Blue component, as a value between 0 and 255. * - * @param color - In the format 0xAARRGGBB. - * @return - The Blue component of the color, will be between 0 and 255 (0 being no color, 255 full Blue). + * @param color In the format 0xAARRGGBB. + * @return The Blue component of the color, will be between 0 and 255 (0 being no color, 255 full Blue). */ static getBlue(color: number): number; /** * Given 3 color values this will return an integer representation of it. * - * @param r - The red color component, in the range 0 - 255. - * @param g - The green color component, in the range 0 - 255. - * @param b - The blue color component, in the range 0 - 255. - * @return - A native color value integer (format: 0xRRGGBB). + * @param r The red color component, in the range 0 - 255. + * @param g The green color component, in the range 0 - 255. + * @param b The blue color component, in the range 0 - 255. + * @return A native color value integer (format: 0xRRGGBB). */ static getColor(red: number, green: number, blue: number): number; /** * Given an alpha and 3 color values this will return an integer representation of it. * - * @param a - The alpha color component, in the range 0 - 255. - * @param r - The red color component, in the range 0 - 255. - * @param g - The green color component, in the range 0 - 255. - * @param b - The blue color component, in the range 0 - 255. - * @return - A native color value integer (format: 0xAARRGGBB). + * @param a The alpha color component, in the range 0 - 255. + * @param r The red color component, in the range 0 - 255. + * @param g The green color component, in the range 0 - 255. + * @param b The blue color component, in the range 0 - 255. + * @return A native color value integer (format: 0xAARRGGBB). */ static getColor32(alpha: number, red: number, green: number, blue: number): number; /** * Given a native color value (in the format 0xAARRGGBB) this will return the Green component, as a value between 0 and 255. * - * @param color - In the format 0xAARRGGBB. - * @return - The Green component of the color, will be between 0 and 255 (0 being no color, 255 full Green). + * @param color In the format 0xAARRGGBB. + * @return The Green component of the color, will be between 0 and 255 (0 being no color, 255 full Green). */ static getGreen(color: number): number; @@ -3192,18 +3192,18 @@ declare module Phaser { * Set the min value to start each channel from the given offset. * Set the max value to restrict the maximum color used per channel. * - * @param min - The lowest value to use for the color. - * @param max - The highest value to use for the color. - * @param alpha - The alpha value of the returning color (default 255 = fully opaque). - * @return - 32-bit color value with alpha. + * @param min The lowest value to use for the color. + * @param max The highest value to use for the color. + * @param alpha The alpha value of the returning color (default 255 = fully opaque). + * @return 32-bit color value with alpha. */ static getRandomColor(min?: number, max?: number, alpha?: number): number; /** * Given a native color value (in the format 0xAARRGGBB) this will return the Red component, as a value between 0 and 255. * - * @param color - In the format 0xAARRGGBB. - * @return - The Red component of the color, will be between 0 and 255 (0 being no color, 255 full Red). + * @param color In the format 0xAARRGGBB. + * @return The Red component of the color, will be between 0 and 255 (0 being no color, 255 full Red). */ static getRed(color: number): number; @@ -3212,24 +3212,24 @@ declare module Phaser { * * Alpha will only be set if it exist in the given color (0xAARRGGBB) * - * @param color - Color in RGB (0xRRGGBB) or ARGB format (0xAARRGGBB). - * @return - An Object with properties: alpha, red, green, blue (also r, g, b and a). Alpha will only be present if a color value > 16777215 was given. + * @param color Color in RGB (0xRRGGBB) or ARGB format (0xAARRGGBB). + * @return An Object with properties: alpha, red, green, blue (also r, g, b and a). Alpha will only be present if a color value > 16777215 was given. */ static getRGB(color: number): any; /** * Returns a CSS friendly string value from the given color. * - * @param color - Color in RGB (0xRRGGBB), ARGB format (0xAARRGGBB) or an Object with r, g, b, a properties. - * @return - A string in the format: 'rgba(r,g,b,a)' + * @param color Color in RGB (0xRRGGBB), ARGB format (0xAARRGGBB) or an Object with r, g, b, a properties. + * @return A string in the format: 'rgba(r,g,b,a)' */ static getWebRGB(color: any): string; /** * Converts a hex string into an integer color value. * - * @param hex - The hex string to convert. Can be in the short-hand format `#03f` or `#0033ff`. - * @return - The rgb color value in the format 0xAARRGGBB. + * @param hex The hex string to convert. Can be in the short-hand format `#03f` or `#0033ff`. + * @return The rgb color value in the format 0xAARRGGBB. */ static hexToRGB(h: string): number; @@ -3240,9 +3240,9 @@ declare module Phaser { * * An alpha channel is _not_ supported. * - * @param hex - The color string in a hex format. - * @param out - An object into which 3 properties will be created or set: r, g and b. If not provided a new object will be created. - * @return - An object with the red, green and blue values set in the r, g and b properties. + * @param hex The color string in a hex format. + * @param out An object into which 3 properties will be created or set: r, g and b. If not provided a new object will be created. + * @return An object with the red, green and blue values set in the r, g and b properties. */ static hexToColor(hex: string, out?: any): any; @@ -3252,20 +3252,20 @@ declare module Phaser { * Assumes HSL values are contained in the set [0, 1] and returns r, g and b values in the set [0, 255]. * Based on code by Michael Jackson (https://github.com/mjijackson) * - * @param h - The hue, in the range 0 - 1. - * @param s - The saturation, in the range 0 - 1. - * @param l - The lightness, in the range 0 - 1. - * @param out - An object into which 3 properties will be created: r, g and b. If not provided a new object will be created. - * @return - An object with the red, green and blue values set in the r, g and b properties. + * @param h The hue, in the range 0 - 1. + * @param s The saturation, in the range 0 - 1. + * @param l The lightness, in the range 0 - 1. + * @param out An object into which 3 properties will be created: r, g and b. If not provided a new object will be created. + * @return An object with the red, green and blue values set in the r, g and b properties. */ static HSLtoRGB(h: number, s: number, l: number, out?: any): any; /** * Get HSL color wheel values in an array which will be 360 elements in size. * - * @param s - The saturation, in the range 0 - 1. - Default: 0.5 - * @param l - The lightness, in the range 0 - 1. - Default: 0.5 - * @return - An array containing 360 elements corresponding to the HSL color wheel. + * @param s The saturation, in the range 0 - 1. - Default: 0.5 + * @param l The lightness, in the range 0 - 1. - Default: 0.5 + * @return An array containing 360 elements corresponding to the HSL color wheel. */ static HSLColorWheel(s?: number, l?: number): any[]; @@ -3275,20 +3275,20 @@ declare module Phaser { * Assumes HSV values are contained in the set [0, 1] and returns r, g and b values in the set [0, 255]. * Based on code by Michael Jackson (https://github.com/mjijackson) * - * @param h - The hue, in the range 0 - 1. - * @param s - The saturation, in the range 0 - 1. - * @param v - The value, in the range 0 - 1. - * @param out - An object into which 3 properties will be created: r, g and b. If not provided a new object will be created. - * @return - An object with the red, green and blue values set in the r, g and b properties. + * @param h The hue, in the range 0 - 1. + * @param s The saturation, in the range 0 - 1. + * @param v The value, in the range 0 - 1. + * @param out An object into which 3 properties will be created: r, g and b. If not provided a new object will be created. + * @return An object with the red, green and blue values set in the r, g and b properties. */ static HSVtoRGB(h: number, s: number, v: number, out?: any): any; /** * Get HSV color wheel values in an array which will be 360 elements in size. * - * @param s - The saturation, in the range 0 - 1. - Default: 1 - * @param v - The value, in the range 0 - 1. - Default: 1 - * @return - An array containing 360 elements corresponding to the HSV color wheel. + * @param s The saturation, in the range 0 - 1. - Default: 1 + * @param v The value, in the range 0 - 1. - Default: 1 + * @return An array containing 360 elements corresponding to the HSV color wheel. */ static HSVColorWheel(s?: number, v?: number): any[]; @@ -3296,50 +3296,50 @@ declare module Phaser { * Converts a hue to an RGB color. * Based on code by Michael Jackson (https://github.com/mjijackson) * - * @param p - - * @param q - - * @param t - - * @return - The color component value. + * @param p + * @param q + * @param t + * @return The color component value. */ static hueToColor(p: number, q: number, t: number): number; /** * Interpolates the two given colours based on the supplied step and currentStep properties. * - * @param color1 - The first color value. - * @param color2 - The second color value. - * @param steps - The number of steps to run the interpolation over. - * @param currentStep - The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two. - * @param alpha - The alpha of the returned color. - * @return - The interpolated color value. + * @param color1 The first color value. + * @param color2 The second color value. + * @param steps The number of steps to run the interpolation over. + * @param currentStep The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two. + * @param alpha The alpha of the returned color. + * @return The interpolated color value. */ static interpolateColor(color1: number, color2: number, steps: number, currentStep: number, alpha: number): number; /** * Interpolates the two given colours based on the supplied step and currentStep properties. * - * @param color - The first color value. - * @param r - The red color value, between 0 and 0xFF (255). - * @param g - The green color value, between 0 and 0xFF (255). - * @param b - The blue color value, between 0 and 0xFF (255). - * @param steps - The number of steps to run the interpolation over. - * @param currentStep - The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two. - * @return - The interpolated color value. + * @param color The first color value. + * @param r The red color value, between 0 and 0xFF (255). + * @param g The green color value, between 0 and 0xFF (255). + * @param b The blue color value, between 0 and 0xFF (255). + * @param steps The number of steps to run the interpolation over. + * @param currentStep The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two. + * @return The interpolated color value. */ static interpolateColorWithRGB(color: number, r: number, g: number, b: number, steps: number, currentStep: number): number; /** * Interpolates the two given colours based on the supplied step and currentStep properties. * - * @param r1 - The red color value, between 0 and 0xFF (255). - * @param g1 - The green color value, between 0 and 0xFF (255). - * @param b1 - The blue color value, between 0 and 0xFF (255). - * @param r2 - The red color value, between 0 and 0xFF (255). - * @param g2 - The green color value, between 0 and 0xFF (255). - * @param b2 - The blue color value, between 0 and 0xFF (255). - * @param steps - The number of steps to run the interpolation over. - * @param currentStep - The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two. - * @return - The interpolated color value. + * @param r1 The red color value, between 0 and 0xFF (255). + * @param g1 The green color value, between 0 and 0xFF (255). + * @param b1 The blue color value, between 0 and 0xFF (255). + * @param r2 The red color value, between 0 and 0xFF (255). + * @param g2 The green color value, between 0 and 0xFF (255). + * @param b2 The blue color value, between 0 and 0xFF (255). + * @param steps The number of steps to run the interpolation over. + * @param currentStep The currentStep value. If the interpolation will take 100 steps, a currentStep value of 50 would be half-way between the two. + * @return The interpolated color value. */ static interpolateRGB(r1: number, g1: number, b1: number, r2: number, g2: number, b2: number, steps: number, currentStep: number): number; @@ -3347,11 +3347,11 @@ declare module Phaser { * Packs the r, g, b, a components into a single integer, for use with Int32Array. * If device is little endian then ABGR order is used. Otherwise RGBA order is used. * - * @param r - The red color component, in the range 0 - 255. - * @param g - The green color component, in the range 0 - 255. - * @param b - The blue color component, in the range 0 - 255. - * @param a - The alpha color component, in the range 0 - 255. - * @return - The packed color as uint32 + * @param r The red color component, in the range 0 - 255. + * @param g The green color component, in the range 0 - 255. + * @param b The blue color component, in the range 0 - 255. + * @param a The alpha color component, in the range 0 - 255. + * @return The packed color as uint32 */ static packPixel(r: number, g: number, b: number, a: number): number; @@ -3361,11 +3361,11 @@ declare module Phaser { * Assumes RGB values are contained in the set [0, 255] and returns h, s and l in the set [0, 1]. * Based on code by Michael Jackson (https://github.com/mjijackson) * - * @param r - The red color component, in the range 0 - 255. - * @param g - The green color component, in the range 0 - 255. - * @param b - The blue color component, in the range 0 - 255. - * @param out - An object into which 3 properties will be created, h, s and l. If not provided a new object will be created. - * @return - An object with the hue, saturation and lightness values set in the h, s and l properties. + * @param r The red color component, in the range 0 - 255. + * @param g The green color component, in the range 0 - 255. + * @param b The blue color component, in the range 0 - 255. + * @param out An object into which 3 properties will be created, h, s and l. If not provided a new object will be created. + * @return An object with the hue, saturation and lightness values set in the h, s and l properties. */ static RGBtoHSL(r: number, g: number, b: number, out?: any): any; @@ -3375,11 +3375,11 @@ declare module Phaser { * Assumes RGB values are contained in the set [0, 255] and returns h, s and v in the set [0, 1]. * Based on code by Michael Jackson (https://github.com/mjijackson) * - * @param r - The red color component, in the range 0 - 255. - * @param g - The green color component, in the range 0 - 255. - * @param b - The blue color component, in the range 0 - 255. - * @param out - An object into which 3 properties will be created, h, s and v. If not provided a new object will be created. - * @return - An object with the hue, saturation and value set in the h, s and v properties. + * @param r The red color component, in the range 0 - 255. + * @param g The green color component, in the range 0 - 255. + * @param b The blue color component, in the range 0 - 255. + * @param out An object into which 3 properties will be created, h, s and v. If not provided a new object will be created. + * @return An object with the hue, saturation and value set in the h, s and v properties. */ static RGBtoHSV(r: number, g: number, b: number, out?: any): any; @@ -3387,23 +3387,23 @@ declare module Phaser { * Converts the given color values into a string. * If prefix was '#' it will be in the format `#RRGGBB` otherwise `0xAARRGGBB`. * - * @param r - The red color component, in the range 0 - 255. - * @param g - The green color component, in the range 0 - 255. - * @param b - The blue color component, in the range 0 - 255. - * @param a - The alpha color component, in the range 0 - 255. - Default: 255 - * @param prefix - The prefix used in the return string. If '#' it will return `#RRGGBB`, else `0xAARRGGBB`. - Default: '#' - * @return - A string containing the color values. If prefix was '#' it will be in the format `#RRGGBB` otherwise `0xAARRGGBB`. + * @param r The red color component, in the range 0 - 255. + * @param g The green color component, in the range 0 - 255. + * @param b The blue color component, in the range 0 - 255. + * @param a The alpha color component, in the range 0 - 255. - Default: 255 + * @param prefix The prefix used in the return string. If '#' it will return `#RRGGBB`, else `0xAARRGGBB`. - Default: '#' + * @return A string containing the color values. If prefix was '#' it will be in the format `#RRGGBB` otherwise `0xAARRGGBB`. */ static RGBtoString(r: number, g: number, b: number, a?: number, prefix?: string): string; /** * A utility to convert RGBA components to a 32 bit integer in RRGGBBAA format. * - * @param r - The red color component, in the range 0 - 255. - * @param g - The green color component, in the range 0 - 255. - * @param b - The blue color component, in the range 0 - 255. - * @param a - The alpha color component, in the range 0 - 255. - * @return - A RGBA-packed 32 bit integer + * @param r The red color component, in the range 0 - 255. + * @param g The green color component, in the range 0 - 255. + * @param b The blue color component, in the range 0 - 255. + * @param a The alpha color component, in the range 0 - 255. + * @return A RGBA-packed 32 bit integer */ static toRGBA(r: number, g: number, b: number, a: number): number; @@ -3417,19 +3417,19 @@ declare module Phaser { * the format is 0xAABBGGRR and on big-endian the format is 0xRRGGBBAA. If you want a * endian-independent method, use fromRGBA(rgba) and toRGBA(r, g, b, a). * - * @param rgba - The integer, packed in endian order by packPixel. - * @param out - An object into which 3 properties will be created: r, g and b. If not provided a new object will be created. - * @param hsl - Also convert the rgb values into hsl? - Default: false - * @param hsv - Also convert the rgb values into hsv? - Default: false - * @return - An object with the red, green and blue values set in the r, g and b properties. + * @param rgba The integer, packed in endian order by packPixel. + * @param out An object into which 3 properties will be created: r, g and b. If not provided a new object will be created. + * @param hsl Also convert the rgb values into hsl? - Default: false + * @param hsv Also convert the rgb values into hsv? - Default: false + * @return An object with the red, green and blue values set in the r, g and b properties. */ static unpackPixel(rgba: number, out?: any, hsl?: boolean, hsv?: boolean): any; /** * Takes a color object and updates the rgba property. * - * @param out - The color object to update. - * @return - A native color value integer (format: 0xAARRGGBB). + * @param out The color object to update. + * @return A native color value integer (format: 0xAARRGGBB). */ static updateColor(out: any): number; @@ -3440,9 +3440,9 @@ declare module Phaser { * * An alpha channel is _not_ supported when specifying a hex string. * - * @param value - The color expressed as a recognized string format or a packed integer. - * @param out - The object to use for the output. If not provided a new object will be created. - * @return - The (`out`) object with the red, green, blue, and alpha values set as the r/g/b/a properties. + * @param value The color expressed as a recognized string format or a packed integer. + * @param out The object to use for the output. If not provided a new object will be created. + * @return The (`out`) object with the red, green, blue, and alpha values set as the r/g/b/a properties. */ static valueToColor(value: string, out?: any): { r: number; g: number; b: number; a: number; }; @@ -3451,9 +3451,9 @@ declare module Phaser { * * The web string can be in the format `'rgb(r,g,b)'` or `'rgba(r,g,b,a)'` where r/g/b are in the range [0..255] and a is in the range [0..1]. * - * @param web - The color string in CSS 'web' format. - * @param out - An object into which 4 properties will be created: r, g, b and a. If not provided a new object will be created. - * @return - An object with the red, green, blue and alpha values set in the r, g, b and a properties. + * @param web The color string in CSS 'web' format. + * @param out An object into which 4 properties will be created: r, g, b and a. If not provided a new object will be created. + * @return An object with the red, green, blue and alpha values set in the r, g, b and a properties. */ static webToColor(web: string, out?: any): { r: number; g: number; b: number; a: number; }; @@ -3525,8 +3525,8 @@ declare module Phaser { /** * Check whether the host environment can play audio. * - * @param type - One of 'mp3, 'ogg', 'm4a', 'wav', 'webm' or 'opus'. - * @return - True if the given file type is supported by the browser, otherwise false. + * @param type One of 'mp3, 'ogg', 'm4a', 'wav', 'webm' or 'opus'. + * @return True if the given file type is supported by the browser, otherwise false. */ static canPlayAudio(type: string): boolean; @@ -3945,24 +3945,24 @@ declare module Phaser { /** * Back ease-in. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static In(k: number): number; /** * Back ease-out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static Out(k: number): number; /** * Back ease-in/out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static InOut(k: number): number; } @@ -3976,24 +3976,24 @@ declare module Phaser { /** * Bounce ease-in. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static In(k: number): number; /** * Bounce ease-out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static Out(k: number): number; /** * Bounce ease-in/out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static InOut(k: number): number; } @@ -4007,24 +4007,24 @@ declare module Phaser { /** * Circular ease-in. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static In(k: number): number; /** * Circular ease-out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static Out(k: number): number; /** * Circular ease-in/out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static InOut(k: number): number; } @@ -4038,24 +4038,24 @@ declare module Phaser { /** * Cubic ease-in. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static In(k: number): number; /** * Cubic ease-out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static Out(k: number): number; /** * Cubic ease-in/out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static InOut(k: number): number; } @@ -4069,24 +4069,24 @@ declare module Phaser { /** * Elastic ease-in. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static In(k: number): number; /** * Elastic ease-out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static Out(k: number): number; /** * Elastic ease-in/out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static InOut(k: number): number; } @@ -4100,24 +4100,24 @@ declare module Phaser { /** * Exponential ease-in. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static In(k: number): number; /** * Exponential ease-out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static Out(k: number): number; /** * Exponential ease-in/out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static InOut(k: number): number; } @@ -4131,8 +4131,8 @@ declare module Phaser { /** * Linear Easing (no variation). * - * @param k - The value to be tweened. - * @return - k. + * @param k The value to be tweened. + * @return k. */ static None(k: number): number; } @@ -4146,24 +4146,24 @@ declare module Phaser { /** * Ease-in. * - * @param k - The value to be tweened. - * @return - k^2. + * @param k The value to be tweened. + * @return k^2. */ static In(k: number): number; /** * Ease-out. * - * @param k - The value to be tweened. - * @return - k* (2-k). + * @param k The value to be tweened. + * @return k* (2-k). */ static Out(k: number): number; /** * Ease-in/out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static InOut(k: number): number; } @@ -4177,24 +4177,24 @@ declare module Phaser { /** * Quartic ease-in. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static In(k: number): number; /** * Quartic ease-out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static Out(k: number): number; /** * Quartic ease-in/out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static InOut(k: number): number; } @@ -4208,24 +4208,24 @@ declare module Phaser { /** * Quintic ease-in. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static In(k: number): number; /** * Quintic ease-out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static Out(k: number): number; /** * Quintic ease-in/out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static InOut(k: number): number; } @@ -4239,24 +4239,24 @@ declare module Phaser { /** * Sinusoidal ease-in. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static In(k: number): number; /** * Sinusoidal ease-out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static Out(k: number): number; /** * Sinusoidal ease-in/out. * - * @param k - The value to be tweened. - * @return - The tweened value. + * @param k The value to be tweened. + * @return The tweened value. */ static InOut(k: number): number; } @@ -4273,10 +4273,10 @@ declare module Phaser { /** * Creates a Ellipse object. A curve on a plane surrounding two focal points. * - * @param x - The X coordinate of the upper-left corner of the framing rectangle of this ellipse. - Default: 0 - * @param y - The Y coordinate of the upper-left corner of the framing rectangle of this ellipse. - Default: 0 - * @param width - The overall width of this ellipse. - Default: 0 - * @param height - The overall height of this ellipse. - Default: 0 + * @param x The X coordinate of the upper-left corner of the framing rectangle of this ellipse. - Default: 0 + * @param y The Y coordinate of the upper-left corner of the framing rectangle of this ellipse. - Default: 0 + * @param width The overall width of this ellipse. - Default: 0 + * @param height The overall height of this ellipse. - Default: 0 */ constructor(x?: number, y?: number, width?: number, height?: number); @@ -4333,56 +4333,56 @@ declare module Phaser { /** * Returns a new Ellipse object with the same values for the x, y, width, and height properties as this Ellipse object. * - * @param output - Optional Ellipse object. If given the values will be set into the object, otherwise a brand new Ellipse object will be created and returned. - * @return - The cloned Ellipse object. + * @param output Optional Ellipse object. If given the values will be set into the object, otherwise a brand new Ellipse object will be created and returned. + * @return The cloned Ellipse object. */ clone(output: Phaser.Ellipse): Phaser.Ellipse; /** * Return true if the given x/y coordinates are within this Ellipse object. * - * @param x - The X value of the coordinate to test. - * @param y - The Y value of the coordinate to test. - * @return - True if the coordinates are within this ellipse, otherwise false. + * @param x The X value of the coordinate to test. + * @param y The Y value of the coordinate to test. + * @return True if the coordinates are within this ellipse, otherwise false. */ contains(x: number, y: number): boolean; /** * Copies the x, y, width and height properties from any given object to this Ellipse. * - * @param source - The object to copy from. - * @return - This Ellipse object. + * @param source The object to copy from. + * @return This Ellipse object. */ copyFrom(source: any): Phaser.Ellipse; /** * Copies the x, y, width and height properties from this Ellipse to any given object. * - * @param dest - The object to copy to. - * @return - This dest object. + * @param dest The object to copy to. + * @return This dest object. */ copyTo(dest: any): any; /** * Returns the framing rectangle of the ellipse as a Phaser.Rectangle object. - * @return - The bounds of the Ellipse. + * @return The bounds of the Ellipse. */ getBounds(): Phaser.Rectangle; /** * Sets the members of the Ellipse to the specified values. * - * @param x - The X coordinate of the upper-left corner of the framing rectangle of this ellipse. - * @param y - The Y coordinate of the upper-left corner of the framing rectangle of this ellipse. - * @param width - The overall width of this ellipse. - * @param height - The overall height of this ellipse. - * @return - This Ellipse object. + * @param x The X coordinate of the upper-left corner of the framing rectangle of this ellipse. + * @param y The Y coordinate of the upper-left corner of the framing rectangle of this ellipse. + * @param width The overall width of this ellipse. + * @param height The overall height of this ellipse. + * @return This Ellipse object. */ setTo(x: number, y: number, width: number, height: number): Phaser.Ellipse; /** * Returns a string representation of this object. - * @return - A string representation of the instance. + * @return A string representation of the instance. */ toString(): string; @@ -4416,7 +4416,7 @@ declare module Phaser { * The Input-related events will only be dispatched if the Sprite has had `inputEnabled` set to `true` * and the Animation-related events only apply to game objects with animations like {@link Phaser.Sprite}. * - * @param sprite - A reference to the game object / Sprite that owns this Events object. + * @param sprite A reference to the game object / Sprite that owns this Events object. */ constructor(sprite: Phaser.Sprite); @@ -4529,9 +4529,9 @@ declare module Phaser { /** * This is a base Filter class to use for any Phaser filter development. * - * @param game - A reference to the currently running game. - * @param uniforms - Uniform mappings object - * @param fragmentSrc - The fragment shader code. + * @param game A reference to the currently running game. + * @param uniforms Uniform mappings object + * @param fragmentSrc The fragment shader code. */ constructor(game: Phaser.Game, ...args: any[]); @@ -4598,8 +4598,8 @@ declare module Phaser { /** * Set the resolution uniforms on the filter. * - * @param width - The width of the display. - * @param height - The height of the display. + * @param width The width of the display. + * @param height The height of the display. */ setResolution(width: number, height: number): void; syncUniforms(): void; @@ -4607,7 +4607,7 @@ declare module Phaser { /** * Updates the filter. * - * @param pointer - A Pointer object to use for the filter. The coordinates are mapped to the mouse uniform. + * @param pointer A Pointer object to use for the filter. The coordinates are mapped to the mouse uniform. */ update(pointer?: Phaser.Pointer): void; @@ -4789,9 +4789,9 @@ declare module Phaser { * FlexGrid is a a responsive grid manager that works in conjunction with the ScaleManager RESIZE scaling mode and FlexLayers * to provide for game object positioning in a responsive manner. * - * @param manager - The ScaleManager. - * @param width - The width of the game. - * @param height - The height of the game. + * @param manager The ScaleManager. + * @param width The width of the game. + * @param height The height of the game. */ constructor(manager: Phaser.ScaleManager, width: number, height: number); @@ -4840,34 +4840,34 @@ declare module Phaser { /** * A custom layer is centered on the game and maintains its aspect ratio as it scales up and down. * - * @param width - Width of this layer in pixels. - * @param height - Height of this layer in pixels. - * @param children - An array of children that are used to populate the FlexLayer. - * @return - The Layer object. + * @param width Width of this layer in pixels. + * @param height Height of this layer in pixels. + * @param children An array of children that are used to populate the FlexLayer. + * @return The Layer object. */ createCustomLayer(width: number, height: number, children?: PIXI.DisplayObject[], addToWorld?: boolean): Phaser.FlexLayer; /** * A fluid layer is centered on the game and maintains its aspect ratio as it scales up and down. * - * @param children - An array of children that are used to populate the FlexLayer. - * @return - The Layer object. + * @param children An array of children that are used to populate the FlexLayer. + * @return The Layer object. */ createFluidLayer(children: PIXI.DisplayObject[]): Phaser.FlexLayer; /** * A full layer is placed at 0,0 and extends to the full size of the game. Children are scaled according to the fluid ratios. * - * @param children - An array of children that are used to populate the FlexLayer. - * @return - The Layer object. + * @param children An array of children that are used to populate the FlexLayer. + * @return The Layer object. */ createFullLayer(children: PIXI.DisplayObject[]): Phaser.FlexLayer; /** * A fixed layer is centered on the game and is the size of the required dimensions and is never scaled. * - * @param children - An array of children that are used to populate the FlexLayer. - * @return - The Layer object. + * @param children An array of children that are used to populate the FlexLayer. + * @return The Layer object. */ createFixedLayer(children: PIXI.DisplayObject[]): Phaser.FlexLayer; @@ -4879,8 +4879,8 @@ declare module Phaser { /** * Called when the game container changes dimensions. * - * @param width - The new width of the game container. - * @param height - The new height of the game container. + * @param width The new width of the game container. + * @param height The new height of the game container. */ onResize(width: number, height: number): void; @@ -4897,8 +4897,8 @@ declare module Phaser { /** * Sets the core game size. This resets the w/h parameters and bounds. * - * @param width - The new dimensions. - * @param height - The new dimensions. + * @param width The new dimensions. + * @param height The new dimensions. */ setSize(width: number, height: number): void; @@ -4922,10 +4922,10 @@ declare module Phaser { * * A responsive grid layer. * - * @param manager - The FlexGrid that owns this FlexLayer. - * @param position - A reference to the Point object used for positioning. - * @param bounds - A reference to the Rectangle used for the layer bounds. - * @param scale - A reference to the Point object used for layer scaling. + * @param manager The FlexGrid that owns this FlexLayer. + * @param position A reference to the Point object used for positioning. + * @param bounds A reference to the Rectangle used for the layer bounds. + * @param scale A reference to the Point object used for layer scaling. */ constructor(manager: Phaser.ScaleManager, position: Phaser.Point, bounds: Phaser.Rectangle, scale: Phaser.Point); @@ -4973,13 +4973,13 @@ declare module Phaser { /** * A Frame is a single frame of an animation and is part of a FrameData collection. * - * @param index - The index of this Frame within the FrameData set it is being added to. - * @param x - X position of the frame within the texture image. - * @param y - Y position of the frame within the texture image. - * @param width - Width of the frame within the texture image. - * @param height - Height of the frame within the texture image. - * @param name - The name of the frame. In Texture Atlas data this is usually set to the filename. - * @param uuid - Internal UUID key. + * @param index The index of this Frame within the FrameData set it is being added to. + * @param x X position of the frame within the texture image. + * @param y Y position of the frame within the texture image. + * @param width Width of the frame within the texture image. + * @param height Height of the frame within the texture image. + * @param name The name of the frame. In Texture Atlas data this is usually set to the filename. + * @param uuid Internal UUID key. */ constructor(index: number, x: number, y: number, width: number, height: number, name: string, uuid: string); @@ -5100,28 +5100,28 @@ declare module Phaser { /** * Clones this Frame into a new Phaser.Frame object and returns it. * Note that all properties are cloned, including the name, index and UUID. - * @return - An exact copy of this Frame object. + * @return An exact copy of this Frame object. */ clone(): Phaser.Frame; /** * Returns a Rectangle set to the dimensions of this Frame. * - * @param out - A rectangle to copy the frame dimensions to. - * @return - A rectangle. + * @param out A rectangle to copy the frame dimensions to. + * @return A rectangle. */ getRect(out?: Phaser.Rectangle): Phaser.Rectangle; /** * If the frame was trimmed when added to the Texture Atlas this records the trim and source data. * - * @param trimmed - If this frame was trimmed or not. - * @param actualWidth - The width of the frame before being trimmed. - * @param actualHeight - The height of the frame before being trimmed. - * @param destX - The destination X position of the trimmed frame for display. - * @param destY - The destination Y position of the trimmed frame for display. - * @param destWidth - The destination width of the trimmed frame for display. - * @param destHeight - The destination height of the trimmed frame for display. + * @param trimmed If this frame was trimmed or not. + * @param actualWidth The width of the frame before being trimmed. + * @param actualHeight The height of the frame before being trimmed. + * @param destX The destination X position of the trimmed frame for display. + * @param destY The destination Y position of the trimmed frame for display. + * @param destWidth The destination width of the trimmed frame for display. + * @param destHeight The destination height of the trimmed frame for display. */ setTrim(trimmed: boolean, actualWidth: number, actualHeight: number, destX: number, destY: number, destWidth: number, destHeight: number): void; @@ -5143,38 +5143,38 @@ declare module Phaser { /** * Adds a new Frame to this FrameData collection. Typically called by the Animation.Parser and not directly. * - * @param frame - The frame to add to this FrameData set. - * @return - The frame that was just added. + * @param frame The frame to add to this FrameData set. + * @return The frame that was just added. */ addFrame(frame: Frame): Phaser.Frame; /** * Check if there is a Frame with the given name. * - * @param name - The name of the frame you want to check. - * @return - True if the frame is found, otherwise false. + * @param name The name of the frame you want to check. + * @return True if the frame is found, otherwise false. */ checkFrameName(name: string): boolean; /** * Makes a copy of this FrameData including copies (not references) to all of the Frames it contains. - * @return - A clone of this object, including clones of the Frame objects it contains. + * @return A clone of this object, including clones of the Frame objects it contains. */ clone(): Phaser.FrameData; /** * Get a Frame by its numerical index. * - * @param index - The index of the frame you want to get. - * @return - The frame, if found. + * @param index The index of the frame you want to get. + * @return The frame, if found. */ getFrame(index: number): Phaser.Frame; /** * Get a Frame by its frame name. * - * @param name - The name of the frame you want to get. - * @return - The frame, if found. + * @param name The name of the frame you want to get. + * @return The frame, if found. */ getFrameByName(name: string): Phaser.Frame; @@ -5182,20 +5182,20 @@ declare module Phaser { * Returns all of the Frame indexes in this FrameData set. * The frames indexes are returned in the output array, or if none is provided in a new Array object. * - * @param frames - An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned. - * @param useNumericIndex - Are the given frames using numeric indexes (default) or strings? (false) - Default: true - * @param output - If given the results will be appended to the end of this array otherwise a new array will be created. - * @return - An array of all Frame indexes matching the given names or IDs. + * @param frames An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned. + * @param useNumericIndex Are the given frames using numeric indexes (default) or strings? (false) - Default: true + * @param output If given the results will be appended to the end of this array otherwise a new array will be created. + * @return An array of all Frame indexes matching the given names or IDs. */ getFrameIndexes(frames: number[], useNumericIndex?: boolean, output?: number[]): number[]; /** * Returns a range of frames based on the given start and end frame indexes and returns them in an Array. * - * @param start - The starting frame index. - * @param end - The ending frame index. - * @param output - If given the results will be appended to the end of this array otherwise a new array will be created. - * @return - An array of Frames between the start and end index values, or an empty array if none were found. + * @param start The starting frame index. + * @param end The ending frame index. + * @param output If given the results will be appended to the end of this array otherwise a new array will be created. + * @return An array of Frames between the start and end index values, or an empty array if none were found. */ getFrameRange(start: number, end: number, output: Phaser.Frame[]): Phaser.Frame[]; @@ -5203,10 +5203,10 @@ declare module Phaser { * Returns all of the Frames in this FrameData set where the frame index is found in the input array. * The frames are returned in the output array, or if none is provided in a new Array object. * - * @param frames - An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned. - * @param useNumericIndex - Are the given frames using numeric indexes (default) or strings? (false) - Default: true - * @param output - If given the results will be appended to the end of this array otherwise a new array will be created. - * @return - An array of all Frames in this FrameData set matching the given names or IDs. + * @param frames An Array containing the indexes of the frames to retrieve. If the array is empty then all frames in the FrameData are returned. + * @param useNumericIndex Are the given frames using numeric indexes (default) or strings? (false) - Default: true + * @param output If given the results will be appended to the end of this array otherwise a new array will be created. + * @return An array of all Frames in this FrameData set matching the given names or IDs. */ getFrames(frames: number[], useNumericIndex?: boolean, output?: Phaser.Frame[]): Phaser.Frame[]; @@ -5246,14 +5246,14 @@ declare module Phaser { * "Hell, there are no rules here - we're trying to accomplish something." * Thomas A. Edison * - * @param width - The width of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage width of the parent container, or the browser window if no parent is given. - Default: 800 - * @param height - The height of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage height of the parent container, or the browser window if no parent is given. - Default: 600 - * @param renderer - Which renderer to use: Phaser.AUTO will auto-detect, Phaser.WEBGL, Phaser.CANVAS or Phaser.HEADLESS (no rendering at all). - Default: Phaser.AUTO - * @param parent - The DOM element into which this games canvas will be injected. Either a DOM ID (string) or the element itself. - Default: '' - * @param state - The default state object. A object consisting of Phaser.State functions (preload, create, update, render) or null. - Default: null - * @param transparent - Use a transparent canvas background or not. - Default: false - * @param antialias - Draw all image textures anti-aliased or not. The default is for smooth textures, but disable if your game features pixel art. - Default: true - * @param physicsConfig - A physics configuration object to pass to the Physics world on creation. - Default: null + * @param width The width of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage width of the parent container, or the browser window if no parent is given. - Default: 800 + * @param height The height of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage height of the parent container, or the browser window if no parent is given. - Default: 600 + * @param renderer Which renderer to use: Phaser.AUTO will auto-detect, Phaser.WEBGL, Phaser.CANVAS or Phaser.HEADLESS (no rendering at all). - Default: Phaser.AUTO + * @param parent The DOM element into which this games canvas will be injected. Either a DOM ID (string) or the element itself. - Default: '' + * @param state The default state object. A object consisting of Phaser.State functions (preload, create, update, render) or null. - Default: null + * @param transparent Use a transparent canvas background or not. - Default: false + * @param antialias Draw all image textures anti-aliased or not. The default is for smooth textures, but disable if your game features pixel art. - Default: true + * @param physicsConfig A physics configuration object to pass to the Physics world on creation. - Default: null */ constructor(width?: string, height?: string, renderer?: number, parent?: any, state?: any, transparent?: boolean, antialias?: boolean, physicsConfig?: any); @@ -5264,14 +5264,14 @@ declare module Phaser { * "Hell, there are no rules here - we're trying to accomplish something." * Thomas A. Edison * - * @param width - The width of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage width of the parent container, or the browser window if no parent is given. - Default: 800 - * @param height - The height of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage height of the parent container, or the browser window if no parent is given. - Default: 600 - * @param renderer - Which renderer to use: Phaser.AUTO will auto-detect, Phaser.WEBGL, Phaser.CANVAS or Phaser.HEADLESS (no rendering at all). - Default: Phaser.AUTO - * @param parent - The DOM element into which this games canvas will be injected. Either a DOM ID (string) or the element itself. - Default: '' - * @param state - The default state object. A object consisting of Phaser.State functions (preload, create, update, render) or null. - Default: null - * @param transparent - Use a transparent canvas background or not. - Default: false - * @param antialias - Draw all image textures anti-aliased or not. The default is for smooth textures, but disable if your game features pixel art. - Default: true - * @param physicsConfig - A physics configuration object to pass to the Physics world on creation. - Default: null + * @param width The width of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage width of the parent container, or the browser window if no parent is given. - Default: 800 + * @param height The height of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage height of the parent container, or the browser window if no parent is given. - Default: 600 + * @param renderer Which renderer to use: Phaser.AUTO will auto-detect, Phaser.WEBGL, Phaser.CANVAS or Phaser.HEADLESS (no rendering at all). - Default: Phaser.AUTO + * @param parent The DOM element into which this games canvas will be injected. Either a DOM ID (string) or the element itself. - Default: '' + * @param state The default state object. A object consisting of Phaser.State functions (preload, create, update, render) or null. - Default: null + * @param transparent Use a transparent canvas background or not. - Default: false + * @param antialias Draw all image textures anti-aliased or not. The default is for smooth textures, but disable if your game features pixel art. - Default: true + * @param physicsConfig A physics configuration object to pass to the Physics world on creation. - Default: null */ constructor(width?: number, height?: number, renderer?: number, parent?: any, state?: any, transparent?: boolean, antialias?: boolean, physicsConfig?: any); @@ -5282,14 +5282,14 @@ declare module Phaser { * "Hell, there are no rules here - we're trying to accomplish something." * Thomas A. Edison * - * @param width - The width of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage width of the parent container, or the browser window if no parent is given. - Default: 800 - * @param height - The height of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage height of the parent container, or the browser window if no parent is given. - Default: 600 - * @param renderer - Which renderer to use: Phaser.AUTO will auto-detect, Phaser.WEBGL, Phaser.CANVAS or Phaser.HEADLESS (no rendering at all). - Default: Phaser.AUTO - * @param parent - The DOM element into which this games canvas will be injected. Either a DOM ID (string) or the element itself. - Default: '' - * @param state - The default state object. A object consisting of Phaser.State functions (preload, create, update, render) or null. - Default: null - * @param transparent - Use a transparent canvas background or not. - Default: false - * @param antialias - Draw all image textures anti-aliased or not. The default is for smooth textures, but disable if your game features pixel art. - Default: true - * @param physicsConfig - A physics configuration object to pass to the Physics world on creation. - Default: null + * @param width The width of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage width of the parent container, or the browser window if no parent is given. - Default: 800 + * @param height The height of your game in game pixels. If given as a string the value must be between 0 and 100 and will be used as the percentage height of the parent container, or the browser window if no parent is given. - Default: 600 + * @param renderer Which renderer to use: Phaser.AUTO will auto-detect, Phaser.WEBGL, Phaser.CANVAS or Phaser.HEADLESS (no rendering at all). - Default: Phaser.AUTO + * @param parent The DOM element into which this games canvas will be injected. Either a DOM ID (string) or the element itself. - Default: '' + * @param state The default state object. A object consisting of Phaser.State functions (preload, create, update, render) or null. - Default: null + * @param transparent Use a transparent canvas background or not. - Default: false + * @param antialias Draw all image textures anti-aliased or not. The default is for smooth textures, but disable if your game features pixel art. - Default: true + * @param physicsConfig A physics configuration object to pass to the Physics world on creation. - Default: null */ constructor(config: IGameConfig); @@ -5586,28 +5586,28 @@ declare module Phaser { /** * Called by the Stage visibility handler. * - * @param event - The DOM event that caused the game to pause, if any. + * @param event The DOM event that caused the game to pause, if any. */ focusGain(event: any): void; /** * Called by the Stage visibility handler. * - * @param event - The DOM event that caused the game to pause, if any. + * @param event The DOM event that caused the game to pause, if any. */ focusLoss(event: any): void; /** * Called by the Stage visibility handler. * - * @param event - The DOM event that caused the game to pause, if any. + * @param event The DOM event that caused the game to pause, if any. */ gamePaused(event: any): void; /** * Called by the Stage visibility handler. * - * @param event - The DOM event that caused the game to pause, if any. + * @param event The DOM event that caused the game to pause, if any. */ gameResumed(event: any): void; @@ -5636,14 +5636,14 @@ declare module Phaser { /** * The core game loop. * - * @param time - The current time as provided by RequestAnimationFrame. + * @param time The current time as provided by RequestAnimationFrame. */ update(time: number): void; /** * Updates all logic subsystems in Phaser. Called automatically by Game.update. * - * @param timeStep - The current timeStep value as determined by Game.update. + * @param timeStep The current timeStep value as determined by Game.update. */ updateLogic(timeStep: number): void; @@ -5658,7 +5658,7 @@ declare module Phaser { * Should you wish to have fine-grained control over when Phaser renders then use the `Game.lockRender` boolean. * Phaser will only render when this boolean is `false`. * - * @param elapsedTime - The time elapsed since the last update. + * @param elapsedTime The time elapsed since the last update. */ updateRender(timeStep: number): void; @@ -5676,7 +5676,7 @@ declare module Phaser { * The GameObjectCreator is a quick way to create common game objects _without_ adding them to the game world. * The object creator can be accessed with {@linkcode Phaser.Game#make `game.make`}. * - * @param game - A reference to the currently running game. + * @param game A reference to the currently running game. */ constructor(game: Phaser.Game); @@ -5695,19 +5695,19 @@ declare module Phaser { /** * Creates a new Sound object. * - * @param key - The Game.cache key of the sound that this object will use. - * @param volume - The volume at which the sound will be played. - Default: 1 - * @param loop - Whether or not the sound will loop. - Default: false - * @param connect - Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. - Default: true - * @return - The newly created text object. + * @param key The Game.cache key of the sound that this object will use. + * @param volume The volume at which the sound will be played. - Default: 1 + * @param loop Whether or not the sound will loop. - Default: false + * @param connect Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. - Default: true + * @return The newly created text object. */ audio(key: string, volume?: number, loop?: boolean, connect?: boolean): Phaser.Sound; /** * Creates a new AudioSprite object. * - * @param key - The Game.cache key of the sound that this object will use. - * @return - The newly created AudioSprite object. + * @param key The Game.cache key of the sound that this object will use. + * @return The newly created AudioSprite object. */ audioSprite(key: string): Phaser.AudioSprite; @@ -5716,39 +5716,39 @@ declare module Phaser { * * A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites. * - * @param width - The width of the BitmapData in pixels. - Default: 256 - * @param height - The height of the BitmapData in pixels. - Default: 256 - * @param key - Asset key for the BitmapData when stored in the Cache (see addToCache parameter). - Default: '' - * @param addToCache - Should this BitmapData be added to the Game.Cache? If so you can retrieve it with Cache.getBitmapData(key) - Default: false - * @return - The newly created BitmapData object. + * @param width The width of the BitmapData in pixels. - Default: 256 + * @param height The height of the BitmapData in pixels. - Default: 256 + * @param key Asset key for the BitmapData when stored in the Cache (see addToCache parameter). - Default: '' + * @param addToCache Should this BitmapData be added to the Game.Cache? If so you can retrieve it with Cache.getBitmapData(key) - Default: false + * @return The newly created BitmapData object. */ bitmapData(width?: number, height?: number, key?: string, addToCache?: boolean): Phaser.BitmapData; /** * Create a new BitmapText object. * - * @param x - X position of the new bitmapText object. - * @param y - Y position of the new bitmapText object. - * @param font - The key of the BitmapText font as stored in Game.Cache. - * @param text - The actual text that will be rendered. Can be set later via BitmapText.text. - * @param size - The size the font will be rendered in, in pixels. - * @return - The newly created bitmapText object. + * @param x X position of the new bitmapText object. + * @param y Y position of the new bitmapText object. + * @param font The key of the BitmapText font as stored in Game.Cache. + * @param text The actual text that will be rendered. Can be set later via BitmapText.text. + * @param size The size the font will be rendered in, in pixels. + * @return The newly created bitmapText object. */ bitmapText(x: number, y: number, font: string, text?: string, size?: number): Phaser.BitmapText; /** * Creates a new Button object. * - * @param x - X position of the new button object. - * @param y - Y position of the new button object. - * @param key - The image key as defined in the Game.Cache to use as the texture for this button. - * @param callback - The function to call when this button is pressed - * @param callbackContext - The context in which the callback will be called (usually 'this') - * @param overFrame - This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name. - * @param outFrame - This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name. - * @param downFrame - This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name. - * @param upFrame - This is the frame or frameName that will be set when this button is in an up state. Give either a number to use a frame ID or a string for a frame name. - * @return - The newly created button object. + * @param x X position of the new button object. + * @param y Y position of the new button object. + * @param key The image key as defined in the Game.Cache to use as the texture for this button. + * @param callback The function to call when this button is pressed + * @param callbackContext The context in which the callback will be called (usually 'this') + * @param overFrame This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name. + * @param outFrame This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name. + * @param downFrame This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name. + * @param upFrame This is the frame or frameName that will be set when this button is in an up state. Give either a number to use a frame ID or a string for a frame name. + * @return The newly created button object. */ button(x?: number, y?: number, key?: string, callback?: Function, callbackContext?: any, overFrame?: any, outFrame?: any, downFrame?: any, upFrame?: any): Phaser.Button; @@ -5759,40 +5759,40 @@ declare module Phaser { * continuous effects like rain and fire. All it really does is launch Particle objects out * at set intervals, and fixes their positions and velocities accorindgly. * - * @param x - The x coordinate within the Emitter that the particles are emitted from. - Default: 0 - * @param y - The y coordinate within the Emitter that the particles are emitted from. - Default: 0 - * @param maxParticles - The total number of particles in this emitter. - Default: 50 - * @return - The newly created emitter object. + * @param x The x coordinate within the Emitter that the particles are emitted from. - Default: 0 + * @param y The y coordinate within the Emitter that the particles are emitted from. - Default: 0 + * @param maxParticles The total number of particles in this emitter. - Default: 50 + * @return The newly created emitter object. */ emitter(x?: number, y?: number, maxParticles?: number): Phaser.Particles.Arcade.Emitter; /** * A WebGL shader/filter that can be applied to Sprites. * - * @param filter - The name of the filter you wish to create, for example HueRotate or SineWave. - * @param undefined - Whatever parameters are needed to be passed to the filter init function. - * @return - The newly created Phaser.Filter object. + * @param filter The name of the filter you wish to create, for example HueRotate or SineWave. + * @param undefined Whatever parameters are needed to be passed to the filter init function. + * @return The newly created Phaser.Filter object. */ filter(filter: any, ...args: any[]): Phaser.Filter; /** * Creates a new Graphics object. * - * @param x - X position of the new graphics object. - * @param y - Y position of the new graphics object. - * @return - The newly created graphics object. + * @param x X position of the new graphics object. + * @param y Y position of the new graphics object. + * @return The newly created graphics object. */ graphics(x: number, y: number): Phaser.Graphics; /** * A Group is a container for display objects that allows for fast pooling, recycling and collision checks. * - * @param parent - The parent Group or DisplayObjectContainer that will hold this group, if any. - * @param name - A name for this Group. Not used internally but useful for debugging. - Default: 'group' - * @param addToStage - If set to true this Group will be added directly to the Game.Stage instead of Game.World. - Default: false - * @param enableBody - If true all Sprites created with `Group.create` or `Group.createMulitple` will have a physics body created on them. Change the body type with physicsBodyType. - Default: false - * @param physicsBodyType - If enableBody is true this is the type of physics body that is created on new Sprites. Phaser.Physics.ARCADE, Phaser.Physics.P2, Phaser.Physics.NINJA, etc. - Default: 0 - * @return - The newly created Group. + * @param parent The parent Group or DisplayObjectContainer that will hold this group, if any. + * @param name A name for this Group. Not used internally but useful for debugging. - Default: 'group' + * @param addToStage If set to true this Group will be added directly to the Game.Stage instead of Game.World. - Default: false + * @param enableBody If true all Sprites created with `Group.create` or `Group.createMulitple` will have a physics body created on them. Change the body type with physicsBodyType. - Default: false + * @param physicsBodyType If enableBody is true this is the type of physics body that is created on new Sprites. Phaser.Physics.ARCADE, Phaser.Physics.P2, Phaser.Physics.NINJA, etc. - Default: 0 + * @return The newly created Group. */ group(parent?: any, name?: string, addToStage?: boolean, enableBody?: boolean, physicsBodyType?: number): Phaser.Group; @@ -5802,22 +5802,22 @@ declare module Phaser { * An Image is a light-weight object you can use to display anything that doesn't need physics or animation. * It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics. * - * @param x - X position of the image. - * @param y - Y position of the image. - * @param key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. - * @param frame - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. - * @return - the newly created sprite object. + * @param x X position of the image. + * @param y Y position of the image. + * @param key This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. + * @param frame If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. + * @return the newly created sprite object. */ image(x: number, y: number, key?: any, frame?: any): Phaser.Image; /** * A dynamic initially blank canvas to which images can be drawn. * - * @param width - the width of the RenderTexture. - Default: 100 - * @param height - the height of the RenderTexture. - Default: 100 - * @param key - Asset key for the RenderTexture when stored in the Cache (see addToCache parameter). - Default: '' - * @param addToCache - Should this RenderTexture be added to the Game.Cache? If so you can retrieve it with Cache.getTexture(key) - Default: false - * @return - The newly created RenderTexture object. + * @param width the width of the RenderTexture. - Default: 100 + * @param height the height of the RenderTexture. - Default: 100 + * @param key Asset key for the RenderTexture when stored in the Cache (see addToCache parameter). - Default: '' + * @param addToCache Should this RenderTexture be added to the Game.Cache? If so you can retrieve it with Cache.getTexture(key) - Default: false + * @return The newly created RenderTexture object. */ renderTexture(width?: number, height?: number, key?: any, addToCache?: boolean): Phaser.RenderTexture; @@ -5831,72 +5831,72 @@ declare module Phaser { * The texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all, * i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects. * - * @param font - The key of the image in the Game.Cache that the RetroFont will use. - * @param characterWidth - The width of each character in the font set. - * @param characterHeight - The height of each character in the font set. - * @param chars - The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements. - * @param charsPerRow - The number of characters per row in the font set. - * @param xSpacing - If the characters in the font set have horizontal spacing between them set the required amount here. - Default: 0 - * @param ySpacing - If the characters in the font set have vertical spacing between them set the required amount here. - Default: 0 - * @param xOffset - If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. - Default: 0 - * @param yOffset - If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. - Default: 0 - * @return - The newly created RetroFont texture which can be applied to an Image or Sprite. + * @param font The key of the image in the Game.Cache that the RetroFont will use. + * @param characterWidth The width of each character in the font set. + * @param characterHeight The height of each character in the font set. + * @param chars The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements. + * @param charsPerRow The number of characters per row in the font set. + * @param xSpacing If the characters in the font set have horizontal spacing between them set the required amount here. - Default: 0 + * @param ySpacing If the characters in the font set have vertical spacing between them set the required amount here. - Default: 0 + * @param xOffset If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. - Default: 0 + * @param yOffset If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. - Default: 0 + * @return The newly created RetroFont texture which can be applied to an Image or Sprite. */ retroFont(font: string, characterWidth: number, characterHeight: number, chars: string, charsPerRow: number, xSpacing?: number, ySpacing?: number, xOffset?: number, yOffset?: number): Phaser.RetroFont; /** * Creates a new Rope object. * - * @param x - The x coordinate (in world space) to position the Rope at. - * @param y - The y coordinate (in world space) to position the Rope at. - * @param width - The width of the Rope. - * @param height - The height of the Rope. - * @param key - This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. - * @param frame - If this Rope is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. - * @return - The newly created rope object. + * @param x The x coordinate (in world space) to position the Rope at. + * @param y The y coordinate (in world space) to position the Rope at. + * @param width The width of the Rope. + * @param height The height of the Rope. + * @param key This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. + * @param frame If this Rope is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. + * @return The newly created rope object. */ rope(x: number, y: number, key: any, frame?: any, points?: Phaser.Point[]): Phaser.Rope; /** * Creates a new Sound object. * - * @param key - The Game.cache key of the sound that this object will use. - * @param volume - The volume at which the sound will be played. - Default: 1 - * @param loop - Whether or not the sound will loop. - Default: false - * @param connect - Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. - Default: true - * @return - The newly created text object. + * @param key The Game.cache key of the sound that this object will use. + * @param volume The volume at which the sound will be played. - Default: 1 + * @param loop Whether or not the sound will loop. - Default: false + * @param connect Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. - Default: true + * @return The newly created text object. */ sound(key: string, volume?: number, loop?: boolean, connect?: boolean): Phaser.Sound; /** * Create a new Sprite with specific position and sprite sheet key. * - * @param x - X position of the new sprite. - * @param y - Y position of the new sprite. - * @param key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. - * @param frame - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. - * @return - the newly created sprite object. + * @param x X position of the new sprite. + * @param y Y position of the new sprite. + * @param key This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. + * @param frame If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. + * @return the newly created sprite object. */ sprite(x: number, y: number, key?: any, frame?: any): Phaser.Sprite; /** * Create a new SpriteBatch. * - * @param parent - The parent Group or DisplayObjectContainer that will hold this group, if any. - * @param name - A name for this Group. Not used internally but useful for debugging. - Default: 'group' - * @param addToStage - If set to true this Group will be added directly to the Game.Stage instead of Game.World. - Default: false - * @return - The newly created group. + * @param parent The parent Group or DisplayObjectContainer that will hold this group, if any. + * @param name A name for this Group. Not used internally but useful for debugging. - Default: 'group' + * @param addToStage If set to true this Group will be added directly to the Game.Stage instead of Game.World. - Default: false + * @return The newly created group. */ spriteBatch(parent: any, name?: String, addToStage?: boolean): Phaser.SpriteBatch; /** * Creates a new Text object. * - * @param x - X position of the new text object. - * @param y - Y position of the new text object. - * @param text - The actual text that will be written. - * @param style - The style object containing style attributes like font, font size , etc. - * @return - The newly created text object. + * @param x X position of the new text object. + * @param y Y position of the new text object. + * @param text The actual text that will be written. + * @param style The style object containing style attributes like font, font size , etc. + * @return The newly created text object. */ text(x: number, y: number, text?: string, style?: any): Phaser.Text; tileMap(key: string, tileWidth?: number, tileHeight?: number, width?: number, height?: number): Phaser.Tilemap; @@ -5904,13 +5904,13 @@ declare module Phaser { /** * Creates a new TileSprite object. * - * @param x - The x coordinate (in world space) to position the TileSprite at. - * @param y - The y coordinate (in world space) to position the TileSprite at. - * @param width - The width of the TileSprite. - * @param height - The height of the TileSprite. - * @param key - This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. - * @param frame - If this TileSprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. - * @return - The newly created tileSprite object. + * @param x The x coordinate (in world space) to position the TileSprite at. + * @param y The y coordinate (in world space) to position the TileSprite at. + * @param width The width of the TileSprite. + * @param height The height of the TileSprite. + * @param key This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. + * @param frame If this TileSprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. + * @return The newly created tileSprite object. */ tileSprite(x: number, y: number, width: number, height: number, key: any, frame: any): Phaser.TileSprite; @@ -5919,8 +5919,8 @@ declare module Phaser { * * The object can be any JavaScript object or Phaser object such as Sprite. * - * @param obj - Object the tween will be run on. - * @return - The Tween object. + * @param obj Object the tween will be run on. + * @return The Tween object. */ tween(obj: any): Phaser.Tween; @@ -5942,7 +5942,7 @@ declare module Phaser { * * Created objects are _automtically added_ to the appropriate Manager, World, or manually specified parent Group. * - * @param game - A reference to the currently running game. + * @param game A reference to the currently running game. */ constructor(game: Phaser.Game); @@ -5961,19 +5961,19 @@ declare module Phaser { /** * Creates a new Sound object. * - * @param key - The Game.cache key of the sound that this object will use. - * @param volume - The volume at which the sound will be played. - Default: 1 - * @param loop - Whether or not the sound will loop. - Default: false - * @param connect - Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. - Default: true - * @return - The newly created text object. + * @param key The Game.cache key of the sound that this object will use. + * @param volume The volume at which the sound will be played. - Default: 1 + * @param loop Whether or not the sound will loop. - Default: false + * @param connect Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. - Default: true + * @return The newly created text object. */ audio(key: string, volume?: number, loop?: boolean, connect?: boolean): Phaser.Sound; /** * Creates a new AudioSprite object. * - * @param key - The Game.cache key of the sound that this object will use. - * @return - The newly created AudioSprite object. + * @param key The Game.cache key of the sound that this object will use. + * @return The newly created AudioSprite object. */ audioSprite(key: string): Phaser.AudioSprite; @@ -5982,41 +5982,41 @@ declare module Phaser { * * A BitmapData object can be manipulated and drawn to like a traditional Canvas object and used to texture Sprites. * - * @param width - The width of the BitmapData in pixels. - Default: 256 - * @param height - The height of the BitmapData in pixels. - Default: 256 - * @param key - Asset key for the BitmapData when stored in the Cache (see addToCache parameter). - Default: '' - * @param addToCache - Should this BitmapData be added to the Game.Cache? If so you can retrieve it with Cache.getBitmapData(key) - Default: false - * @return - The newly created BitmapData object. + * @param width The width of the BitmapData in pixels. - Default: 256 + * @param height The height of the BitmapData in pixels. - Default: 256 + * @param key Asset key for the BitmapData when stored in the Cache (see addToCache parameter). - Default: '' + * @param addToCache Should this BitmapData be added to the Game.Cache? If so you can retrieve it with Cache.getBitmapData(key) - Default: false + * @return The newly created BitmapData object. */ bitmapData(width?: number, height?: number, key?: string, addToCache?: boolean): Phaser.BitmapData; /** * Create a new BitmapText object. * - * @param x - X position of the new bitmapText object. - * @param y - Y position of the new bitmapText object. - * @param font - The key of the BitmapText font as stored in Game.Cache. - * @param text - The actual text that will be rendered. Can be set later via BitmapText.text. - * @param size - The size the font will be rendered in, in pixels. - * @param group - Optional Group to add the object to. If not specified it will be added to the World group. - * @return - The newly created bitmapText object. + * @param x X position of the new bitmapText object. + * @param y Y position of the new bitmapText object. + * @param font The key of the BitmapText font as stored in Game.Cache. + * @param text The actual text that will be rendered. Can be set later via BitmapText.text. + * @param size The size the font will be rendered in, in pixels. + * @param group Optional Group to add the object to. If not specified it will be added to the World group. + * @return The newly created bitmapText object. */ bitmapText(x: number, y: number, font: string, text?: string, size?: number, group?: Phaser.Group): Phaser.BitmapText; /** * Creates a new Button object. * - * @param x - X position of the new button object. - * @param y - Y position of the new button object. - * @param key - The image key as defined in the Game.Cache to use as the texture for this button. - * @param callback - The function to call when this button is pressed - * @param callbackContext - The context in which the callback will be called (usually 'this') - * @param overFrame - This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name. - * @param outFrame - This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name. - * @param downFrame - This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name. - * @param upFrame - This is the frame or frameName that will be set when this button is in an up state. Give either a number to use a frame ID or a string for a frame name. - * @param group - Optional Group to add the object to. If not specified it will be added to the World group. - * @return - The newly created button object. + * @param x X position of the new button object. + * @param y Y position of the new button object. + * @param key The image key as defined in the Game.Cache to use as the texture for this button. + * @param callback The function to call when this button is pressed + * @param callbackContext The context in which the callback will be called (usually 'this') + * @param overFrame This is the frame or frameName that will be set when this button is in an over state. Give either a number to use a frame ID or a string for a frame name. + * @param outFrame This is the frame or frameName that will be set when this button is in an out state. Give either a number to use a frame ID or a string for a frame name. + * @param downFrame This is the frame or frameName that will be set when this button is in a down state. Give either a number to use a frame ID or a string for a frame name. + * @param upFrame This is the frame or frameName that will be set when this button is in an up state. Give either a number to use a frame ID or a string for a frame name. + * @param group Optional Group to add the object to. If not specified it will be added to the World group. + * @return The newly created button object. */ button(x?: number, y?: number, key?: string, callback?: Function, callbackContext?: any, overFrame?: any, outFrame?: any, downFrame?: any, upFrame?: any, group?: Phaser.Group): Phaser.Button; @@ -6027,49 +6027,49 @@ declare module Phaser { * continuous effects like rain and fire. All it really does is launch Particle objects out * at set intervals, and fixes their positions and velocities accorindgly. * - * @param x - The x coordinate within the Emitter that the particles are emitted from. - Default: 0 - * @param y - The y coordinate within the Emitter that the particles are emitted from. - Default: 0 - * @param maxParticles - The total number of particles in this emitter. - Default: 50 - * @return - The newly created emitter object. + * @param x The x coordinate within the Emitter that the particles are emitted from. - Default: 0 + * @param y The y coordinate within the Emitter that the particles are emitted from. - Default: 0 + * @param maxParticles The total number of particles in this emitter. - Default: 50 + * @return The newly created emitter object. */ emitter(x?: number, y?: number, maxParticles?: number): Phaser.Particles.Arcade.Emitter; /** * Adds an existing object to the game world. * - * @param object - An instance of Phaser.Sprite, Phaser.Button or any other display object.. - * @return - The child that was added to the Group. + * @param object An instance of Phaser.Sprite, Phaser.Button or any other display object.. + * @return The child that was added to the Group. */ existing(object: any): any; /** * A WebGL shader/filter that can be applied to Sprites. * - * @param filter - The name of the filter you wish to create, for example HueRotate or SineWave. - * @param undefined - Whatever parameters are needed to be passed to the filter init function. - * @return - The newly created Phaser.Filter object. + * @param filter The name of the filter you wish to create, for example HueRotate or SineWave. + * @param undefined Whatever parameters are needed to be passed to the filter init function. + * @return The newly created Phaser.Filter object. */ filter(filter: string, ...args: any[]): Phaser.Filter; /** * Creates a new Graphics object. * - * @param x - X position of the new graphics object. - * @param y - Y position of the new graphics object. - * @param group - Optional Group to add the object to. If not specified it will be added to the World group. - * @return - The newly created graphics object. + * @param x X position of the new graphics object. + * @param y Y position of the new graphics object. + * @param group Optional Group to add the object to. If not specified it will be added to the World group. + * @return The newly created graphics object. */ graphics(x: number, y: number, group?: Phaser.Group): Phaser.Graphics; /** * A Group is a container for display objects that allows for fast pooling, recycling and collision checks. * - * @param parent - The parent Group or DisplayObjectContainer that will hold this group, if any. If set to null the Group won't be added to the display list. If undefined it will be added to World by default. - * @param name - A name for this Group. Not used internally but useful for debugging. - Default: 'group' - * @param addToStage - If set to true this Group will be added directly to the Game.Stage instead of Game.World. - Default: false - * @param enableBody - If true all Sprites created with `Group.create` or `Group.createMulitple` will have a physics body created on them. Change the body type with physicsBodyType. - Default: false - * @param physicsBodyType - If enableBody is true this is the type of physics body that is created on new Sprites. Phaser.Physics.ARCADE, Phaser.Physics.P2, Phaser.Physics.NINJA, etc. - Default: 0 - * @return - The newly created group. + * @param parent The parent Group or DisplayObjectContainer that will hold this group, if any. If set to null the Group won't be added to the display list. If undefined it will be added to World by default. + * @param name A name for this Group. Not used internally but useful for debugging. - Default: 'group' + * @param addToStage If set to true this Group will be added directly to the Game.Stage instead of Game.World. - Default: false + * @param enableBody If true all Sprites created with `Group.create` or `Group.createMulitple` will have a physics body created on them. Change the body type with physicsBodyType. - Default: false + * @param physicsBodyType If enableBody is true this is the type of physics body that is created on new Sprites. Phaser.Physics.ARCADE, Phaser.Physics.P2, Phaser.Physics.NINJA, etc. - Default: 0 + * @return The newly created group. */ group(parent?: any, name?: string, addToStage?: boolean, enableBody?: boolean, physicsBodyType?: number): Phaser.Group; @@ -6077,12 +6077,12 @@ declare module Phaser { * Create a new `Image` object. An Image is a light-weight object you can use to display anything that doesn't need physics or animation. * It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics. * - * @param x - X position of the image. - * @param y - Y position of the image. - * @param key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. - * @param frame - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. - * @param group - Optional Group to add the object to. If not specified it will be added to the World group. - * @return - the newly created sprite object. + * @param x X position of the image. + * @param y Y position of the image. + * @param key This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. + * @param frame If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. + * @param group Optional Group to add the object to. If not specified it will be added to the World group. + * @return the newly created sprite object. */ image(x: number, y: number, key?: any, frame?: any, group?: Phaser.Group): Phaser.Image; @@ -6091,11 +6091,11 @@ declare module Phaser { * A Physics Group is the same as an ordinary Group except that is has enableBody turned on by default, so any Sprites it creates * are automatically given a physics body. * - * @param physicsBodyType - If enableBody is true this is the type of physics body that is created on new Sprites. Phaser.Physics.ARCADE, Phaser.Physics.P2, Phaser.Physics.NINJA, etc. - Default: Phaser.Physics.ARCADE - * @param parent - The parent Group or DisplayObjectContainer that will hold this group, if any. If set to null the Group won't be added to the display list. If undefined it will be added to World by default. - * @param name - A name for this Group. Not used internally but useful for debugging. - Default: 'group' - * @param addToStage - If set to true this Group will be added directly to the Game.Stage instead of Game.World. - Default: false - * @return - The newly created group. + * @param physicsBodyType If enableBody is true this is the type of physics body that is created on new Sprites. Phaser.Physics.ARCADE, Phaser.Physics.P2, Phaser.Physics.NINJA, etc. - Default: Phaser.Physics.ARCADE + * @param parent The parent Group or DisplayObjectContainer that will hold this group, if any. If set to null the Group won't be added to the display list. If undefined it will be added to World by default. + * @param name A name for this Group. Not used internally but useful for debugging. - Default: 'group' + * @param addToStage If set to true this Group will be added directly to the Game.Stage instead of Game.World. - Default: false + * @return The newly created group. */ physicsGroup(physicsBodyType: number, parent?: any, name?: string, addToStage?: boolean): Phaser.Group; @@ -6104,20 +6104,20 @@ declare module Phaser { * * The Plugin must have 2 properties: `game` and `parent`. Plugin.game is set to the game reference the PluginManager uses, and parent is set to the PluginManager. * - * @param plugin - The Plugin to add into the PluginManager. This can be a function or an existing object. - * @param args - Additional parameters that will be passed to the Plugin.init method. - * @return - The Plugin that was added to the manager. + * @param plugin The Plugin to add into the PluginManager. This can be a function or an existing object. + * @param args Additional parameters that will be passed to the Plugin.init method. + * @return The Plugin that was added to the manager. */ plugin(plugin: Phaser.Plugin, ...parameter: any[]): Phaser.Plugin; /** * A dynamic initially blank canvas to which images can be drawn. * - * @param width - the width of the RenderTexture. - Default: 100 - * @param height - the height of the RenderTexture. - Default: 100 - * @param key - Asset key for the RenderTexture when stored in the Cache (see addToCache parameter). - Default: '' - * @param addToCache - Should this RenderTexture be added to the Game.Cache? If so you can retrieve it with Cache.getTexture(key) - Default: false - * @return - The newly created RenderTexture object. + * @param width the width of the RenderTexture. - Default: 100 + * @param height the height of the RenderTexture. - Default: 100 + * @param key Asset key for the RenderTexture when stored in the Cache (see addToCache parameter). - Default: '' + * @param addToCache Should this RenderTexture be added to the Game.Cache? If so you can retrieve it with Cache.getTexture(key) - Default: false + * @return The newly created RenderTexture object. */ renderTexture(width?: number, height?: number, key?: string, addToCache?: boolean): Phaser.RenderTexture; @@ -6131,29 +6131,29 @@ declare module Phaser { * The texture can be asssigned or one or multiple images/sprites, but note that the text the RetroFont uses will be shared across them all, * i.e. if you need each Image to have different text in it, then you need to create multiple RetroFont objects. * - * @param font - The key of the image in the Game.Cache that the RetroFont will use. - * @param characterWidth - The width of each character in the font set. - * @param characterHeight - The height of each character in the font set. - * @param chars - The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements. - * @param charsPerRow - The number of characters per row in the font set. - * @param xSpacing - If the characters in the font set have horizontal spacing between them set the required amount here. - Default: 0 - * @param ySpacing - If the characters in the font set have vertical spacing between them set the required amount here. - Default: 0 - * @param xOffset - If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. - Default: 0 - * @param yOffset - If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. - Default: 0 - * @return - The newly created RetroFont texture which can be applied to an Image or Sprite. + * @param font The key of the image in the Game.Cache that the RetroFont will use. + * @param characterWidth The width of each character in the font set. + * @param characterHeight The height of each character in the font set. + * @param chars The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements. + * @param charsPerRow The number of characters per row in the font set. + * @param xSpacing If the characters in the font set have horizontal spacing between them set the required amount here. - Default: 0 + * @param ySpacing If the characters in the font set have vertical spacing between them set the required amount here. - Default: 0 + * @param xOffset If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. - Default: 0 + * @param yOffset If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. - Default: 0 + * @return The newly created RetroFont texture which can be applied to an Image or Sprite. */ retroFont(font: string, characterWidth: number, characterHeight: number, chars: string, charsPerRow: number, xSpacing?: number, ySpacing?: number, xOffset?: number, yOffset?: number): Phaser.RetroFont; /** * Creates a new Rope object. * - * @param x - The x coordinate (in world space) to position the TileSprite at. - * @param y - The y coordinate (in world space) to position the TileSprite at. - * @param key - This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. - * @param frame - If this TileSprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. - * @param points - An array of {Phaser.Point}. - * @param group - Optional Group to add the object to. If not specified it will be added to the World group. - * @return - The newly created tileSprite object. + * @param x The x coordinate (in world space) to position the TileSprite at. + * @param y The y coordinate (in world space) to position the TileSprite at. + * @param key This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. + * @param frame If this TileSprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. + * @param points An array of {Phaser.Point}. + * @param group Optional Group to add the object to. If not specified it will be added to the World group. + * @return The newly created tileSprite object. Example usage: https://github.com/codevinsky/phaser-rope-demo/blob/master/dist/demo.js */ rope(x: number, y: number, key: any, frame?: any, points?: Phaser.Point[]): Phaser.Rope; @@ -6161,23 +6161,23 @@ Example usage: https://github.com/codevinsky/phaser-rope-demo/blob/master/dist/d /** * Creates a new Sound object. * - * @param key - The Game.cache key of the sound that this object will use. - * @param volume - The volume at which the sound will be played. - Default: 1 - * @param loop - Whether or not the sound will loop. - Default: false - * @param connect - Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. - Default: true - * @return - The newly created text object. + * @param key The Game.cache key of the sound that this object will use. + * @param volume The volume at which the sound will be played. - Default: 1 + * @param loop Whether or not the sound will loop. - Default: false + * @param connect Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. - Default: true + * @return The newly created text object. */ sound(key: string, volume?: number, loop?: number, connect?: boolean): Phaser.Sound; /** * Create a new Sprite with specific position and sprite sheet key. * - * @param x - X position of the new sprite. - * @param y - Y position of the new sprite. - * @param key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. - * @param frame - If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. - * @param group - Optional Group to add the object to. If not specified it will be added to the World group. - * @return - the newly created sprite object. + * @param x X position of the new sprite. + * @param y Y position of the new sprite. + * @param key This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. + * @param frame If the sprite uses an image from a texture atlas or sprite sheet you can pass the frame here. Either a number for a frame ID or a string for a frame name. + * @param group Optional Group to add the object to. If not specified it will be added to the World group. + * @return the newly created sprite object. */ sprite(x: number, y: number, key?: any, frame?: any, group?: Phaser.Group): Phaser.Sprite; @@ -6186,22 +6186,22 @@ Example usage: https://github.com/codevinsky/phaser-rope-demo/blob/master/dist/d * Use when you need a lot of sprites or particles all sharing the same texture. * The speed gains are specifically for WebGL. In Canvas mode you won't see any real difference. * - * @param parent - The parent Group that will hold this Sprite Batch. Set to `undefined` or `null` to add directly to game.world. - * @param name - A name for this Sprite Batch. Not used internally but useful for debugging. - Default: 'group' - * @param addToStage - If set to true this Sprite Batch will be added directly to the Game.Stage instead of the parent. - Default: false - * @return - The newly created group. + * @param parent The parent Group that will hold this Sprite Batch. Set to `undefined` or `null` to add directly to game.world. + * @param name A name for this Sprite Batch. Not used internally but useful for debugging. - Default: 'group' + * @param addToStage If set to true this Sprite Batch will be added directly to the Game.Stage instead of the parent. - Default: false + * @return The newly created group. */ spriteBatch(parent: any, name?: string, addToStage?: boolean): Phaser.Group; /** * Creates a new Text object. * - * @param x - X position of the new text object. - * @param y - Y position of the new text object. - * @param text - The actual text that will be written. - * @param style - The style object containing style attributes like font, font size , etc. - * @param group - Optional Group to add the object to. If not specified it will be added to the World group. - * @return - The newly created text object. + * @param x X position of the new text object. + * @param y Y position of the new text object. + * @param text The actual text that will be written. + * @param style The style object containing style attributes like font, font size , etc. + * @param group Optional Group to add the object to. If not specified it will be added to the World group. + * @return The newly created text object. */ text(x: number, y: number, text: string, style: any, group?: Phaser.Group): Phaser.Text; @@ -6214,34 +6214,34 @@ Example usage: https://github.com/codevinsky/phaser-rope-demo/blob/master/dist/d * If creating a blank tilemap to be populated later, you can either specify no parameters at all and then use `Tilemap.create` or pass the map and tile dimensions here. * Note that all Tilemaps use a base tile size to calculate dimensions from, but that a TilemapLayer may have its own unique tile size that overrides it. * - * @param key - The key of the tilemap data as stored in the Cache. If you're creating a blank map either leave this parameter out or pass `null`. - * @param tileWidth - The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. - Default: 32 - * @param tileHeight - The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. - Default: 32 - * @param width - The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. - Default: 10 - * @param height - The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. - Default: 10 - * @return - The newly created tilemap object. + * @param key The key of the tilemap data as stored in the Cache. If you're creating a blank map either leave this parameter out or pass `null`. + * @param tileWidth The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. - Default: 32 + * @param tileHeight The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. - Default: 32 + * @param width The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. - Default: 10 + * @param height The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. - Default: 10 + * @return The newly created tilemap object. */ tilemap(key?: string, tileWidth?: number, tileHeight?: number, width?: number, height?: number): Phaser.Tilemap; /** * Creates a new TileSprite object. * - * @param x - The x coordinate (in world space) to position the TileSprite at. - * @param y - The y coordinate (in world space) to position the TileSprite at. - * @param width - The width of the TileSprite. - * @param height - The height of the TileSprite. - * @param key - This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. - * @param frame - If this TileSprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. - * @param group - Optional Group to add the object to. If not specified it will be added to the World group. - * @return - The newly created tileSprite object. + * @param x The x coordinate (in world space) to position the TileSprite at. + * @param y The y coordinate (in world space) to position the TileSprite at. + * @param width The width of the TileSprite. + * @param height The height of the TileSprite. + * @param key This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. + * @param frame If this TileSprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. + * @param group Optional Group to add the object to. If not specified it will be added to the World group. + * @return The newly created tileSprite object. */ tileSprite(x: number, y: number, width: number, height: number, key?: any, frame?: any, group?: Phaser.Group): Phaser.TileSprite; /** * Create a tween on a specific object. The object can be any JavaScript object or Phaser object such as Sprite. * - * @param obj - Object the tween will be run on. - * @return - The newly created Phaser.Tween object. + * @param obj Object the tween will be run on. + * @return The newly created Phaser.Tween object. */ tween(obj: any): Phaser.Tween; @@ -6271,7 +6271,7 @@ Example usage: https://github.com/codevinsky/phaser-rope-demo/blob/master/dist/d * via prefs flags (about:config, search gamepad). The browsers map the same controllers differently. * This class has constants for Windows 7 Chrome mapping of XBOX 360 controller. * - * @param game - A reference to the currently running game. + * @param game A reference to the currently running game. */ constructor(game: Phaser.Game); @@ -6428,26 +6428,26 @@ Example usage: https://github.com/codevinsky/phaser-rope-demo/blob/master/dist/d /** * Add callbacks to the main Gamepad handler to handle connect/disconnect/button down/button up/axis change/float value buttons. * - * @param context - The context under which the callbacks are run. - * @param callbacks - Object that takes six different callback methods: -onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCallback, onFloatCallback + * @param context The context under which the callbacks are run. + * @param callbacks Object that takes six different callback methods: + * onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCallback, onFloatCallback */ addCallbacks(context: any, callbacks: any): void; /** * Returns true if the button is currently pressed down, on ANY gamepad. * - * @param buttonCode - The buttonCode of the button to check for. - * @return - True if a button is currently down. + * @param buttonCode The buttonCode of the button to check for. + * @return True if a button is currently down. */ isDown(buttonCode: number): boolean; /** * Returns the "just pressed" state of a button from ANY gamepad connected. Just pressed is considered true if the button was pressed down within the duration given (default 250ms). * - * @param buttonCode - The buttonCode of the button to check for. - * @param duration - The duration below which the button is considered as being just pressed. - Default: 250 - * @return - True if the button is just pressed otherwise false. + * @param buttonCode The buttonCode of the button to check for. + * @param duration The duration below which the button is considered as being just pressed. - Default: 250 + * @return True if the button is just pressed otherwise false. */ justPressed(buttonCode: number, duration?: number): boolean; justReleased(buttonCode: number, duration?: number): boolean; @@ -6490,8 +6490,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * If you need more fine-grained control over the handling of specific buttons you can create and use Phaser.GamepadButton objects. * - * @param pad - A reference to the gamepad that owns this button. - * @param buttonCode - The button code this GamepadButton is responsible for. + * @param pad A reference to the gamepad that owns this button. + * @param buttonCode The button code this GamepadButton is responsible for. */ constructor(pad: Phaser.SinglePad, buttonCode: number); @@ -6578,8 +6578,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Returns the "just pressed" state of this button. Just pressed is considered true if the button was pressed down within the duration given (default 250ms). * - * @param duration - The duration below which the button is considered as being just pressed. - Default: 250 - * @return - True if the button is just pressed otherwise false. + * @param duration The duration below which the button is considered as being just pressed. - Default: 250 + * @return True if the button is just pressed otherwise false. */ justPressed(duration?: number): boolean; justReleased(duration?: number): boolean; @@ -6587,21 +6587,21 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Called automatically by Phaser.SinglePad. * - * @param value - Button value + * @param value Button value */ processButtonDown(value: number): void; /** * Called automatically by Phaser.SinglePad. * - * @param value - Button value + * @param value Button value */ processButtonFloat(value: number): void; /** * Called automatically by Phaser.SinglePad. * - * @param value - Button value + * @param value Button value */ processButtonUp(value: number): void; @@ -6621,9 +6621,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Creates a new `Graphics` object. * - * @param game - Current game instance. - * @param x - X position of the new graphics object. - * @param y - Y position of the new graphics object. + * @param game Current game instance. + * @param x X position of the new graphics object. + * @param y Y position of the new graphics object. */ constructor(game: Phaser.Game, x: number, y: number); @@ -6697,7 +6697,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Destroy this Graphics instance. * - * @param destroyChildren - Should every child of this object have its destroy method called? - Default: true + * @param destroyChildren Should every child of this object have its destroy method called? - Default: true */ destroy(): void; drawTriangle(points: Phaser.Point[], cull?: boolean): void; @@ -6744,13 +6744,13 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Groups are also display objects and can be nested as children within other Groups. * - * @param game - A reference to the currently running game. - * @param parent - The parent Group (or other {@link DisplayObject}) that this group will be added to. - If undefined/unspecified the Group will be added to the {@link Phaser.Game#world Game World}; if null the Group will not be added to any parent. - Default: (game world) - * @param name - A name for this group. Not used internally but useful for debugging. - Default: 'group' - * @param addToStage - If true this group will be added directly to the Game.Stage instead of Game.World. - Default: false - * @param enableBody - If true all Sprites created with {@link #create} or {@link #createMulitple} will have a physics body created on them. Change the body type with {@link #physicsBodyType}. - Default: false - * @param physicsBodyType - The physics body type to use when physics bodies are automatically added. See {@link #physicsBodyType} for values. - Default: 0 + * @param game A reference to the currently running game. + * @param parent The parent Group (or other {@link DisplayObject}) that this group will be added to. + * If undefined/unspecified the Group will be added to the {@link Phaser.Game#world Game World}; if null the Group will not be added to any parent. - Default: (game world) + * @param name A name for this group. Not used internally but useful for debugging. - Default: 'group' + * @param addToStage If true this group will be added directly to the Game.Stage instead of Game.World. - Default: false + * @param enableBody If true all Sprites created with {@link #create} or {@link #createMulitple} will have a physics body created on them. Change the body type with {@link #physicsBodyType}. - Default: false + * @param physicsBodyType The physics body type to use when physics bodies are automatically added. See {@link #physicsBodyType} for values. - Default: 0 */ constructor(game: Phaser.Game, parent?: any, name?: string, addToStage?: boolean, enableBody?: boolean, physicsBodyType?: number); @@ -6916,9 +6916,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Use {@link Phaser.Group#addAt addAt} to control where a child is added. Use {@link Phaser.Group#create create} to create and add a new child. * - * @param child - The display object to add as a child. - * @param silent - If true the child will not dispatch the `onAddedToGroup` event. - Default: false - * @return - The child that was added to the group. + * @param child The display object to add as a child. + * @param silent If true the child will not dispatch the `onAddedToGroup` event. - Default: false + * @return The child that was added to the group. */ add(child: any, silent?: boolean): any; @@ -6927,10 +6927,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * `Group.addAll('x', 10)` will add 10 to the child.x value for each child. * - * @param property - The property to increment, for example 'body.velocity.x' or 'angle'. - * @param amount - The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50. - * @param checkAlive - If true the property will only be changed if the child is alive. - * @param checkVisible - If true the property will only be changed if the child is visible. + * @param property The property to increment, for example 'body.velocity.x' or 'angle'. + * @param amount The amount to increment the property by. If child.x = 10 then addAll('x', 40) would make child.x = 50. + * @param checkAlive If true the property will only be changed if the child is alive. + * @param checkVisible If true the property will only be changed if the child is visible. */ addAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): void; @@ -6939,10 +6939,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * The child is added to the group at the location specified by the index value, this allows you to control child ordering. * - * @param child - The display object to add as a child. - * @param index - The index within the group to insert the child to. - Default: 0 - * @param silent - If true the child will not dispatch the `onAddedToGroup` event. - Default: false - * @return - The child that was added to the group. + * @param child The display object to add as a child. + * @param index The index within the group to insert the child to. - Default: 0 + * @param silent If true the child will not dispatch the `onAddedToGroup` event. - Default: false + * @return The child that was added to the group. */ addAt(child: any, index: number, silent?: boolean): any; @@ -6953,17 +6953,17 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * TODO: Add ability to pass the children as parameters rather than having to be an array. * - * @param children - An array of display objects to add as children. - * @param silent - If true the children will not dispatch the `onAddedToGroup` event. - Default: false - * @return - The array of children that were added to the group. + * @param children An array of display objects to add as children. + * @param silent If true the children will not dispatch the `onAddedToGroup` event. - Default: false + * @return The array of children that were added to the group. */ addMultiple(children: any[], silent?: boolean): any[]; /** * Brings the given child to the top of this group so it renders above all other children. * - * @param child - The child to bring to the top of this group. - * @return - The child that was moved. + * @param child The child to bring to the top of this group. + * @return The child that was moved. */ bringToTop(child: any): any; @@ -6973,9 +6973,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The function is called for all children regardless if they are dead or alive (see callAllExists for different options). * After the method parameter and context you can add as many extra parameters as you like, which will all be passed to the child. * - * @param method - Name of the function on the child to call. Deep property lookup is supported. - * @param context - A string containing the context under which the method will be executed. Set to null to default to the child. - Default: null - * @param args - Additional parameters that will be passed to the method. + * @param method Name of the function on the child to call. Deep property lookup is supported. + * @param context A string containing the context under which the method will be executed. Set to null to default to the child. - Default: null + * @param args Additional parameters that will be passed to the method. */ callAll(method: string, context: any, ...parameters: any[]): void; @@ -6984,18 +6984,18 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * After the existsValue parameter you can add as many parameters as you like, which will all be passed to the child callback. * - * @param callback - Name of the function on the children to call. - * @param existsValue - Only children with exists=existsValue will be called. - * @param parameter - Additional parameters that will be passed to the callback. + * @param callback Name of the function on the children to call. + * @param existsValue Only children with exists=existsValue will be called. + * @param parameter Additional parameters that will be passed to the callback. */ callAllExists(callback: Function, existsValue: boolean, ...parameters: any[]): void; /** * Returns a reference to a function that exists on a child of the group based on the given callback array. * - * @param child - The object to inspect. - * @param callback - The array of function names. - * @param length - The size of the array (pre-calculated in callAll). + * @param child The object to inspect. + * @param callback The array of function names. + * @param length The size of the array (pre-calculated in callAll). */ callbackFromArray(child: any, callback: Function, length: number): void; @@ -7004,34 +7004,34 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * This call doesn't descend down children, so if you have a Group inside of this group, the property will be checked on the group but not its children. * - * @param key - The property, as a string, to be set. For example: 'body.velocity.x' - * @param value - The value that will be checked. - * @param checkAlive - If set then only children with alive=true will be checked. This includes any Groups that are children. - Default: false - * @param checkVisible - If set then only children with visible=true will be checked. This includes any Groups that are children. - Default: false - * @param force - If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned. - Default: false + * @param key The property, as a string, to be set. For example: 'body.velocity.x' + * @param value The value that will be checked. + * @param checkAlive If set then only children with alive=true will be checked. This includes any Groups that are children. - Default: false + * @param checkVisible If set then only children with visible=true will be checked. This includes any Groups that are children. - Default: false + * @param force If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned. - Default: false */ checkAll(key: string[], value: any, checkAlive?: boolean, checkVisible?: boolean, force?: boolean): boolean; /** * Checks a property for the given value on the child. * - * @param child - The child to check the property value on. - * @param key - An array of strings that make up the property that will be set. - * @param value - The value that will be checked. - * @param force - If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned. - Default: false - * @return - True if the property was was equal to value, false if not. + * @param child The child to check the property value on. + * @param key An array of strings that make up the property that will be set. + * @param value The value that will be checked. + * @param force If `force` is true then the property will be checked on the child regardless if it already exists or not. If true and the property doesn't exist, false will be returned. - Default: false + * @return True if the property was was equal to value, false if not. */ checkProperty(child: any, key: string[], value: any, force?: boolean): boolean; /** * Get the number of dead children in this group. - * @return - The number of children flagged as dead. + * @return The number of children flagged as dead. */ countDead(): number; /** * Get the number of living children in this group. - * @return - The number of children flagged as alive. + * @return The number of children flagged as alive. */ countLiving(): number; @@ -7040,12 +7040,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Use {@link Phaser.Group#classType classType} to change the type of object creaded. * - * @param x - The x coordinate to display the newly created Sprite at. The value is in relation to the group.x point. - * @param y - The y coordinate to display the newly created Sprite at. The value is in relation to the group.y point. - * @param key - The Game.cache key of the image that this Sprite will use. - * @param frame - If the Sprite image contains multiple frames you can specify which one to use here. - * @param exists - The default exists state of the Sprite. - Default: true - * @return - The child that was created: will be a {@link Phaser.Sprite} unless {@link #classType} has been changed. + * @param x The x coordinate to display the newly created Sprite at. The value is in relation to the group.x point. + * @param y The y coordinate to display the newly created Sprite at. The value is in relation to the group.y point. + * @param key The Game.cache key of the image that this Sprite will use. + * @param frame If the Sprite image contains multiple frames you can specify which one to use here. + * @param exists The default exists state of the Sprite. - Default: true + * @return The child that was created: will be a {@link Phaser.Sprite} unless {@link #classType} has been changed. */ create(x: number, y: number, key: string, frame?: any, exists?: boolean): any; @@ -7057,10 +7057,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * By default the sprites will be set to not exist and will be positioned at 0, 0 (relative to the group.x/y). * Use {@link Phaser.Group#classType classType} to change the type of object creaded. * - * @param quantity - The number of Sprites to create. - * @param key - The Game.cache key of the image that this Sprite will use. - * @param frame - If the Sprite image contains multiple frames you can specify which one to use here. - * @param exists - The default exists state of the Sprite. - Default: false + * @param quantity The number of Sprites to create. + * @param key The Game.cache key of the image that this Sprite will use. + * @param frame If the Sprite image contains multiple frames you can specify which one to use here. + * @param exists The default exists state of the Sprite. - Default: false */ createMultiple(quantity: number, key: string, frame?: any, exists?: boolean): void; @@ -7070,8 +7070,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The `sortHandler` is provided the two parameters: the two children involved in the comparison (a and b). * It should return -1 if `a > b`, 1 if `a < b` or 0 if `a === b`. * - * @param sortHandler - The custom sort function. - * @param context - The context in which the sortHandler is called. - Default: undefined + * @param sortHandler The custom sort function. + * @param context The context in which the sortHandler is called. - Default: undefined */ customSort(sortHandler: Function, context?: any): void; @@ -7080,8 +7080,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Removes all children, then removes this group from its parent and nulls references. * - * @param destroyChildren - If true `destroy` will be invoked on each removed child. - Default: true - * @param soft - A 'soft destroy' (set to true) doesn't remove this group from its parent or null the game reference. Set to false and it does. - Default: false + * @param destroyChildren If true `destroy` will be invoked on each removed child. - Default: true + * @param soft A 'soft destroy' (set to true) doesn't remove this group from its parent or null the game reference. Set to false and it does. - Default: false */ destroy(destroyChildren?: boolean, soft?: boolean): void; @@ -7090,10 +7090,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * `Group.divideAll('x', 2)` will half the child.x value for each child. * - * @param property - The property to divide, for example 'body.velocity.x' or 'angle'. - * @param amount - The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50. - * @param checkAlive - If true the property will only be changed if the child is alive. - * @param checkVisible - If true the property will only be changed if the child is visible. + * @param property The property to divide, for example 'body.velocity.x' or 'angle'. + * @param amount The amount to divide the property by. If child.x = 100 then divideAll('x', 2) would make child.x = 50. + * @param checkAlive If true the property will only be changed if the child is alive. + * @param checkVisible If true the property will only be changed if the child is visible. */ divideAll(property: string, amount: number, checkAlive?: boolean, checkVisible?: boolean): void; @@ -7108,10 +7108,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Note: Currently this will skip any children which are Groups themselves. * - * @param callback - The function that will be called for each applicable child. The child will be passed as the first argument. - * @param callbackContext - The context in which the function should be called (usually 'this'). - * @param checkExists - If set only children matching for which `exists` is true will be passed to the callback, otherwise all children will be passed. - Default: false - * @param args - Additional arguments to pass to the callback function, after the child item. - Default: (none) + * @param callback The function that will be called for each applicable child. The child will be passed as the first argument. + * @param callbackContext The context in which the function should be called (usually 'this'). + * @param checkExists If set only children matching for which `exists` is true will be passed to the callback, otherwise all children will be passed. - Default: false + * @param args Additional arguments to pass to the callback function, after the child item. - Default: (none) */ forEach(callback: Function, callbackContext: any, checkExists?: boolean, ...args: any[]): void; @@ -7120,9 +7120,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * See {@link Phaser.Group#forEach forEach} for details. * - * @param callback - The function that will be called for each applicable child. The child will be passed as the first argument. - * @param callbackContext - The context in which the function should be called (usually 'this'). - * @param args - Additional arguments to pass to the callback function, after the child item. - Default: (none) + * @param callback The function that will be called for each applicable child. The child will be passed as the first argument. + * @param callbackContext The context in which the function should be called (usually 'this'). + * @param args Additional arguments to pass to the callback function, after the child item. - Default: (none) */ forEachAlive(callback: Function, callbackContext: any, ...args: any[]): void; @@ -7131,9 +7131,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * See {@link Phaser.Group#forEach forEach} for details. * - * @param callback - The function that will be called for each applicable child. The child will be passed as the first argument. - * @param callbackContext - The context in which the function should be called (usually 'this'). - * @param args - Additional arguments to pass to the callback function, after the child item. - Default: (none) + * @param callback The function that will be called for each applicable child. The child will be passed as the first argument. + * @param callbackContext The context in which the function should be called (usually 'this'). + * @param args Additional arguments to pass to the callback function, after the child item. - Default: (none) */ forEachDead(callback: Function, callbackContext: any, ...args: any[]): void; @@ -7142,9 +7142,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * See {@link Phaser.Group#forEach forEach} for details. * - * @param callback - The function that will be called for each applicable child. The child will be passed as the first argument. - * @param callbackContext - The context in which the function should be called (usually 'this'). - * @param args - Additional arguments to pass to the callback function, after the child item. - Default: (none) + * @param callback The function that will be called for each applicable child. The child will be passed as the first argument. + * @param callbackContext The context in which the function should be called (usually 'this'). + * @param args Additional arguments to pass to the callback function, after the child item. - Default: (none) */ forEachExists(callback: Function, callbackContext: any): void; @@ -7160,17 +7160,17 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Note: Currently this will skip any children which are Groups themselves. * - * @param predicate - The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, the index as the second, and the entire child array as the third - * @param checkExists - If true, only existing can be selected; otherwise all children can be selected and will be passed to the predicate. - Default: false - * @return - Returns an array list containing all the children that the predicate returned true for + * @param predicate The function that each child will be evaluated against. Each child of the group will be passed to it as its first parameter, the index as the second, and the entire child array as the third + * @param checkExists If true, only existing can be selected; otherwise all children can be selected and will be passed to the predicate. - Default: false + * @return Returns an array list containing all the children that the predicate returned true for */ filter(predicate: Function, checkExists?: boolean): ArraySet; /** * Returns the child found at the given index within this group. * - * @param index - The index to return the child from. - * @return - The child that was found at the given index, or -1 for an invalid index. + * @param index The index to return the child from. + * @return The child that was found at the given index, or -1 for an invalid index. */ getAt(index: number): any; @@ -7178,7 +7178,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Returns the child at the bottom of this group. * * The bottom child the child being displayed (rendered) below every other child. - * @return - The child at the bottom of the Group. + * @return The child at the bottom of the Group. */ getBottom(): any; @@ -7186,7 +7186,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Get the first child that is alive (`child.alive === true`). * * This is handy for checking if everything has been wiped out, or choosing a squad leader, etc. - * @return - The first alive child, or null if none found. + * @return The first alive child, or null if none found. */ getFirstAlive(): any; @@ -7194,32 +7194,32 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Get the first child that is dead (`child.alive === false`). * * This is handy for checking if everything has been wiped out, or choosing a squad leader, etc. - * @return - The first dead child, or null if none found. + * @return The first dead child, or null if none found. */ getFirstDead(): any; /** * Get the first display object that exists, or doesn't exist. * - * @param exists - If true, find the first existing child; otherwise find the first non-existing child. - Default: true - * @return - The first child, or null if none found. + * @param exists If true, find the first existing child; otherwise find the first non-existing child. - Default: true + * @return The first child, or null if none found. */ getFirstExists(exists: boolean): any; /** * Get the index position of the given child in this group, which should match the child's `z` property. * - * @param child - The child to get the index for. - * @return - The index of the child or -1 if it's not a member of this group. + * @param child The child to get the index for. + * @return The index of the child or -1 if it's not a member of this group. */ getIndex(child: any): number; /** * Returns a random child from the group. * - * @param startIndex - Offset from the front of the front of the group (lowest child). - Default: 0 - * @param length - Restriction on the number of values you want to randomly select from. - Default: (to top) - * @return - A random child of this Group. + * @param startIndex Offset from the front of the front of the group (lowest child). - Default: 0 + * @param length Restriction on the number of values you want to randomly select from. - Default: (to top) + * @return A random child of this Group. */ getRandom(startIndex?: number, length?: number): any; @@ -7227,7 +7227,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Return the child at the top of this group. * * The top child is the child displayed (rendered) above every other child. - * @return - The child at the top of the Group. + * @return The child at the top of the Group. */ getTop(): any; @@ -7236,9 +7236,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Will scan up to 4 levels deep only. * - * @param child - The child to check for the existance of the property on. - * @param key - An array of strings that make up the property. - * @return - True if the child has the property, otherwise false. + * @param child The child to check for the existance of the property on. + * @param key An array of strings that make up the property. + * @return True if the child has the property, otherwise false. */ hasProperty(child: any, key: string[]): boolean; @@ -7261,29 +7261,29 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If `args` is specified it must be an array. The matched child will be assigned to the first * element and the entire array will be applied to the callback function. * - * @param key - The child property to check, i.e. 'exists', 'alive', 'health' - * @param value - A child matches if `child[key] === value` is true. - * @param returnType - How to iterate the children and what to return. - * @param callback - Optional function that will be called on each matching child. The matched child is supplied as the first argument. - Default: null - * @param callbackContext - The context in which the function should be called (usually 'this'). - * @param args - The arguments supplied to to the callback; the first array index (argument) will be replaced with the matched child. - Default: (none) - * @return - Returns either an integer (for RETURN_TOTAL), the first matched child (for RETURN_CHILD), or null. + * @param key The child property to check, i.e. 'exists', 'alive', 'health' + * @param value A child matches if `child[key] === value` is true. + * @param returnType How to iterate the children and what to return. + * @param callback Optional function that will be called on each matching child. The matched child is supplied as the first argument. - Default: null + * @param callbackContext The context in which the function should be called (usually 'this'). + * @param args The arguments supplied to to the callback; the first array index (argument) will be replaced with the matched child. - Default: (none) + * @return Returns either an integer (for RETURN_TOTAL), the first matched child (for RETURN_CHILD), or null. */ iterate(key: string, value: any, returnType: number, callback?: Function, callbackContext?: any, ...args: any[]): any; /** * Moves the given child down one place in this group unless it's already at the bottom. * - * @param child - The child to move down in the group. - * @return - The child that was moved. + * @param child The child to move down in the group. + * @return The child that was moved. */ moveDown(child: any): any; /** * Moves the given child up one place in this group unless it's already at the top. * - * @param child - The child to move up in the group. - * @return - The child that was moved. + * @param child The child to move up in the group. + * @return The child that was moved. */ moveUp(child: any): any; @@ -7292,10 +7292,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * `Group.multiplyAll('x', 2)` will x2 the child.x value for each child. * - * @param property - The property to multiply, for example 'body.velocity.x' or 'angle'. - * @param amount - The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20. - * @param checkAlive - If true the property will only be changed if the child is alive. - * @param checkVisible - If true the property will only be changed if the child is visible. + * @param property The property to multiply, for example 'body.velocity.x' or 'angle'. + * @param amount The amount to multiply the property by. If child.x = 10 then multiplyAll('x', 2) would make child.x = 20. + * @param checkAlive If true the property will only be changed if the child is alive. + * @param checkVisible If true the property will only be changed if the child is visible. */ multiplyAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): void; @@ -7303,7 +7303,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Advances the group cursor to the next (higher) object in the group. * * If the cursor is at the end of the group (top child) it is moved the start of the group (bottom child). - * @return - The child the cursor now points to. + * @return The child the cursor now points to. */ next(): void; @@ -7321,7 +7321,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Moves the group cursor to the previous (lower) child in the group. * * If the cursor is at the start of the group (bottom child) it is moved to the end (top child). - * @return - The child the cursor now points to. + * @return The child the cursor now points to. */ previous(): void; @@ -7332,37 +7332,37 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * If the group cursor was referring to the removed child it is updated to refer to the next child. * - * @param child - The child to remove. - * @param destroy - If true `destroy` will be invoked on the removed child. - Default: false - * @param silent - If true the the child will not dispatch the `onRemovedFromGroup` event. - Default: false - * @return - true if the child was removed from this group, otherwise false. + * @param child The child to remove. + * @param destroy If true `destroy` will be invoked on the removed child. - Default: false + * @param silent If true the the child will not dispatch the `onRemovedFromGroup` event. - Default: false + * @return true if the child was removed from this group, otherwise false. */ remove(child: any, destroy?: boolean, silent?: boolean): boolean; /** * Removes all children from this group, but does not remove the group from its parent. * - * @param destroy - If true `destroy` will be invoked on each removed child. - Default: false - * @param silent - If true the children will not dispatch their `onRemovedFromGroup` events. - Default: false + * @param destroy If true `destroy` will be invoked on each removed child. - Default: false + * @param silent If true the children will not dispatch their `onRemovedFromGroup` events. - Default: false */ removeAll(destroy?: boolean, silent?: boolean): void; /** * Removes all children from this group whose index falls beteen the given startIndex and endIndex values. * - * @param startIndex - The index to start removing children from. - * @param endIndex - The index to stop removing children at. Must be higher than startIndex. If undefined this method will remove all children between startIndex and the end of the group. - * @param destroy - If true `destroy` will be invoked on each removed child. - Default: false - * @param silent - If true the children will not dispatch their `onRemovedFromGroup` events. - Default: false + * @param startIndex The index to start removing children from. + * @param endIndex The index to stop removing children at. Must be higher than startIndex. If undefined this method will remove all children between startIndex and the end of the group. + * @param destroy If true `destroy` will be invoked on each removed child. - Default: false + * @param silent If true the children will not dispatch their `onRemovedFromGroup` events. - Default: false */ removeBetween(startIndex: number, endIndex?: number, destroy?: boolean, silent?: boolean): void; /** * Replaces a child of this group with the given newChild. The newChild cannot be a member of this group. * - * @param oldChild - The child in this group that will be replaced. - * @param newChild - The child to be inserted into this group. - * @return - Returns the oldChild that was replaced within this group. + * @param oldChild The child in this group that will be replaced. + * @param newChild The child to be inserted into this group. + * @return Returns the oldChild that was replaced within this group. */ replace(oldChild: any, newChild: any): any; @@ -7371,8 +7371,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * If the optional index parameter is given it sets the cursor to the object at that index instead. * - * @param index - Set the cursor to point to a specific index. - Default: 0 - * @return - The child the cursor now points to. + * @param index Set the cursor to point to a specific index. - Default: 0 + * @return The child the cursor now points to. */ resetCursor(index?: number): any; @@ -7386,8 +7386,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Sends the given child to the bottom of this group so it renders below all other children. * - * @param child - The child to send to the bottom of this group. - * @return - The child that was moved. + * @param child The child to send to the bottom of this group. + * @return The child that was moved. */ sendToBack(child: any): any; @@ -7396,14 +7396,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication. * - * @param child - The child to set the property on. - * @param key - The property, as a string, to be set. For example: 'body.velocity.x' - * @param value - The value that will be set. - * @param checkAlive - If set then the child will only be updated if alive=true. - Default: false - * @param checkVisible - If set then the child will only be updated if visible=true. - Default: false - * @param operation - Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. - Default: 0 - * @param force - If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. - Default: false - * @return - True if the property was set, false if not. + * @param child The child to set the property on. + * @param key The property, as a string, to be set. For example: 'body.velocity.x' + * @param value The value that will be set. + * @param checkAlive If set then the child will only be updated if alive=true. - Default: false + * @param checkVisible If set then the child will only be updated if visible=true. - Default: false + * @param operation Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. - Default: 0 + * @param force If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. - Default: false + * @return True if the property was set, false if not. */ set(child: any, key: string[], value: any, operation?: number, force?: boolean): boolean; @@ -7415,12 +7415,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * The operation parameter controls how the new value is assigned to the property, from simple replacement to addition and multiplication. * - * @param key - The property, as a string, to be set. For example: 'body.velocity.x' - * @param value - The value that will be set. - * @param checkAlive - If set then only children with alive=true will be updated. This includes any Groups that are children. - Default: false - * @param checkVisible - If set then only children with visible=true will be updated. This includes any Groups that are children. - Default: false - * @param operation - Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. - Default: 0 - * @param force - If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. - Default: false + * @param key The property, as a string, to be set. For example: 'body.velocity.x' + * @param value The value that will be set. + * @param checkAlive If set then only children with alive=true will be updated. This includes any Groups that are children. - Default: false + * @param checkVisible If set then only children with visible=true will be updated. This includes any Groups that are children. - Default: false + * @param operation Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. - Default: 0 + * @param force If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. - Default: false */ setAll(key: string, value: any, checkAlive?: boolean, checkVisible?: boolean, operation?: number, force?: boolean): boolean; @@ -7434,12 +7434,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * - 3: will multiply the value already present by the given value. * - 4: will divide the value already present by the given value. * - * @param child - The child to set the property value on. - * @param key - An array of strings that make up the property that will be set. - * @param value - The value that will be set. - * @param operation - Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. - Default: 0 - * @param force - If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. - Default: false - * @return - True if the property was set, false if not. + * @param child The child to set the property value on. + * @param key An array of strings that make up the property that will be set. + * @param value The value that will be set. + * @param operation Controls how the value is assigned. A value of 0 replaces the value with the new one. A value of 1 adds it, 2 subtracts it, 3 multiplies it and 4 divides it. - Default: 0 + * @param force If `force` is true then the property will be set on the child regardless if it already exists or not. If false and the property doesn't exist, nothing will be set. - Default: false + * @return True if the property was set, false if not. */ setProperty(child: any, key: string[], value: any, operation?: number, force?: boolean): boolean; @@ -7449,8 +7449,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Call this function to sort the group according to a particular key value and order. * For example to depth sort Sprites for Zelda-style game you might call `group.sort('y', Phaser.Group.SORT_ASCENDING)` at the bottom of your `State.update()`. * - * @param key - The name of the property to sort on. Defaults to the objects z-depth value. - Default: 'z' - * @param order - Order ascending ({@link Phaser.Group.SORT_ASCENDING SORT_ASCENDING}) or descending ({@link Phaser.Group.SORT_DESCENDING SORT_DESCENDING}). - Default: Phaser.Group.SORT_ASCENDING + * @param key The name of the property to sort on. Defaults to the objects z-depth value. - Default: 'z' + * @param order Order ascending ({@link Phaser.Group.SORT_ASCENDING SORT_ASCENDING}) or descending ({@link Phaser.Group.SORT_DESCENDING SORT_DESCENDING}). - Default: Phaser.Group.SORT_ASCENDING */ sort(key?: string, order?: number): void; @@ -7459,10 +7459,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * `Group.subAll('x', 10)` will minus 10 from the child.x value for each child. * - * @param property - The property to decrement, for example 'body.velocity.x' or 'angle'. - * @param amount - The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10. - * @param checkAlive - If true the property will only be changed if the child is alive. - * @param checkVisible - If true the property will only be changed if the child is visible. + * @param property The property to decrement, for example 'body.velocity.x' or 'angle'. + * @param amount The amount to subtract from the property. If child.x = 50 then subAll('x', 40) would make child.x = 10. + * @param checkAlive If true the property will only be changed if the child is alive. + * @param checkVisible If true the property will only be changed if the child is visible. */ subAll(property: string, amount: number, checkAlive: boolean, checkVisible: boolean): void; @@ -7471,8 +7471,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Both children must be in this group, a child cannot be swapped with itself, and unparented children cannot be swapped. * - * @param child1 - The first child to swap. - * @param child2 - The second child to swap. + * @param child1 The first child to swap. + * @param child2 The second child to swap. */ swap(child1: any, child2: any): boolean; @@ -7491,9 +7491,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Positions the child found at the given index within this group to the given x and y coordinates. * - * @param index - The index of the child in the group to set the position of. - * @param x - The new x position of the child. - * @param y - The new y position of the child. + * @param index The index of the child in the group to set the position of. + * @param x The new x position of the child. + * @param y The new y position of the child. */ xy(index: number, x: number, y: number): void; @@ -7511,11 +7511,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * An Image is a light-weight object you can use to display anything that doesn't need physics or animation. * It can still rotate, scale, crop and receive input events. This makes it perfect for logos, backgrounds, simple buttons and other non-Sprite graphics. * - * @param game - A reference to the currently running game. - * @param x - The x coordinate of the Image. The coordinate is relative to any parent container this Image may be in. - * @param y - The y coordinate of the Image. The coordinate is relative to any parent container this Image may be in. - * @param key - The texture used by the Image during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. - * @param frame - If this Image is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. + * @param game A reference to the currently running game. + * @param x The x coordinate of the Image. The coordinate is relative to any parent container this Image may be in. + * @param y The y coordinate of the Image. The coordinate is relative to any parent container this Image may be in. + * @param key The texture used by the Image during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. + * @param frame If this Image is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. */ constructor(game: Phaser.Game, x: number, y: number, key: any, frame: any); @@ -7678,7 +7678,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Brings the Image to the top of the display list it is a child of. Images that are members of a Phaser.Group are only * bought to the top of that Group, not the entire display list. - * @return - This instance. + * @return This instance. */ bringToTop(): Phaser.Image; @@ -7689,8 +7689,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Please note that the rectangle object given is not duplicated by this method, but rather the Image uses a reference to the rectangle. * Keep this in mind if assigning a rectangle in a for-loop, or when cleaning up for garbage collection. * - * @param rect - The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle. - * @param copy - If false Sprite.cropRect will be a reference to the given rect. If true it will copy the rect values into a local Sprite.cropRect object. - Default: false + * @param rect The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle. + * @param copy If false Sprite.cropRect will be a reference to the given rect. If true it will copy the rect values into a local Sprite.cropRect object. - Default: false */ crop(rect: Phaser.Rectangle, copy?: boolean): void; @@ -7698,7 +7698,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Destroys the Image. This removes it from its parent group, destroys the input, event and animation handlers if present * and nulls its reference to game, freeing it up for garbage collection. * - * @param destroyChildren - Should every child of this object have its destroy method called? - Default: true + * @param destroyChildren Should every child of this object have its destroy method called? - Default: true */ destroy(destroyChildren?: boolean): void; @@ -7707,7 +7707,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * It will dispatch the onKilled event, you can listen to Image.events.onKilled for the signal. * Note that killing a Image is a way for you to quickly recycle it in a Image pool, it doesn't free it up from memory. * If you don't need this Image any more you should call Image.destroy instead. - * @return - This instance. + * @return This instance. */ kill(): Phaser.Image; @@ -7715,8 +7715,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Changes the Texture the Image is using entirely. The old texture is removed and the new one is referenced or fetched from the Cache. * This causes a WebGL texture update, so use sparingly or in low-intensity portions of your game. * - * @param key - This is the image or texture used by the Image during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. - * @param frame - If this Image is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. + * @param key This is the image or texture used by the Image during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. + * @param frame If this Image is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. */ loadTexture(key: any, frame: any): void; @@ -7733,9 +7733,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Resets the Image. This places the Image at the given x/y world coordinates and then sets alive, exists, visible and renderable all to true. * - * @param x - The x coordinate (in world space) to position the Image at. - * @param y - The y coordinate (in world space) to position the Image at. - * @return - This instance. + * @param x The x coordinate (in world space) to position the Image at. + * @param y The y coordinate (in world space) to position the Image at. + * @return This instance. */ reset(x: number, y: number): Phaser.Image; @@ -7748,7 +7748,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Brings a 'dead' Image back to life, optionally giving it the health value specified. * A resurrected Image has its alive, exists and visible properties all set to true. * It will dispatch the onRevived event, you can listen to Image.events.onRevived for the signal. - * @return - This instance. + * @return This instance. */ revive(): Phaser.Image; @@ -7756,7 +7756,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Sets the Texture frame the Image uses for rendering. * This is primarily an internal method used by Image.loadTexture, although you may call it directly. * - * @param frame - The Frame to be used by the Image texture. + * @param frame The Frame to be used by the Image texture. */ setFrame(frame: Phaser.Frame): void; @@ -7776,10 +7776,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Call setScaleMinMax(null) to clear both the scaleMin and scaleMax values. * - * @param minX - The minimum horizontal scale value this Image can scale down to. - * @param minY - The minimum vertical scale value this Image can scale down to. - * @param maxX - The maximum horizontal scale value this Image can scale up to. - * @param maxY - The maximum vertical scale value this Image can scale up to. + * @param minX The minimum horizontal scale value this Image can scale down to. + * @param minY The minimum vertical scale value this Image can scale down to. + * @param maxX The maximum horizontal scale value this Image can scale up to. + * @param maxY The maximum vertical scale value this Image can scale up to. */ setScaleMinMax(minX?: number, minY?: number, maxX?: number, maxY?: number): void; @@ -7808,7 +7808,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Phaser.Input is the Input Manager for all types of Input across Phaser, including mouse, keyboard, touch and MSPointer. * The Input manager is updated automatically by the core game loop. * - * @param game - Current game instance. + * @param game Current game instance. */ constructor(game: Phaser.Game); @@ -8119,7 +8119,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Add a new Pointer object to the Input Manager. * By default Input creates 3 pointer objects: `mousePointer` (not include in part of general pointer pool), `pointer1` and `pointer2`. * This method adds an additional pointer, up to a maximum of Phaser.Input.MAX_POINTERS (default of 10). - * @return - The new Pointer object that was created; null if a new pointer could not be added. + * @return The new Pointer object that was created; null if a new pointer could not be added. */ addPointer(): Phaser.Pointer; @@ -8131,9 +8131,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * to only use if you've limited input to a single pointer (i.e. mouse or touch). * The callback is added to the Phaser.Input.moveCallbacks array and should be removed with Phaser.Input.deleteMoveCallback. * - * @param callback - The callback that will be called each time the activePointer receives a DOM move event. - * @param context - The context in which the callback will be called. - * @return - The index of the callback entry. Use this index when calling Input.deleteMoveCallback. + * @param callback The callback that will be called each time the activePointer receives a DOM move event. + * @param context The context in which the callback will be called. + * @return The index of the callback entry. Use this index when calling Input.deleteMoveCallback. */ addMoveCallback(callback: Function, context: any): number; @@ -8146,7 +8146,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Removes the callback at the defined index from the Phaser.Input.moveCallbacks array * - * @param index - The index of the callback to remove. + * @param index The index of the callback to remove. */ deleteMoveCallback(index: number): void; @@ -8158,17 +8158,17 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * This will return the local coordinates of the specified displayObject based on the given Pointer. * - * @param displayObject - The DisplayObject to get the local coordinates for. - * @param pointer - The Pointer to use in the check against the displayObject. - * @return - A point containing the coordinates of the Pointer position relative to the DisplayObject. + * @param displayObject The DisplayObject to get the local coordinates for. + * @param pointer The Pointer to use in the check against the displayObject. + * @return A point containing the coordinates of the Pointer position relative to the DisplayObject. */ getLocalPosition(displayObject: any, pointer: Phaser.Pointer): Phaser.Point; /** * Get the first Pointer with the given active state. * - * @param isActive - The state the Pointer should be in - active or innactive? - Default: false - * @return - A Pointer object or null if no Pointer object matches the requested state. + * @param isActive The state the Pointer should be in - active or innactive? - Default: false + * @return A Pointer object or null if no Pointer object matches the requested state. */ getPointer(isActive?: boolean): Phaser.Pointer; @@ -8178,8 +8178,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The pointerId property is not set until the Pointer has been used at least once, as its populated by the DOM event. * Also it can change every time you press the pointer down if the browser recycles it. * - * @param pointerId - The `pointerId` (not 'id') value to search for. - * @return - A Pointer object or null if no Pointer object matches the requested identifier. + * @param pointerId The `pointerId` (not 'id') value to search for. + * @return A Pointer object or null if no Pointer object matches the requested identifier. */ getPointerFromId(pointerID: number): Phaser.Pointer; @@ -8190,17 +8190,17 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Also it can change every time you press the pointer down, and is not fixed once set. * Note: Not all browsers set the identifier property and it's not part of the W3C spec, so you may need getPointerFromId instead. * - * @param identifier - The Pointer.identifier value to search for. - * @return - A Pointer object or null if no Pointer object matches the requested identifier. + * @param identifier The Pointer.identifier value to search for. + * @return A Pointer object or null if no Pointer object matches the requested identifier. */ getPointerFromIdentifier(identifier: number): Phaser.Pointer; /** * Tests if the pointer hits the given object. * - * @param displayObject - The displayObject to test for a hit. - * @param pointer - The pointer to use for the test. - * @param localPoint - The local translated point. + * @param displayObject The displayObject to test for a hit. + * @param pointer The pointer to use for the test. + * @param localPoint The local translated point. */ hitTest(displayObject: any, pointer: Phaser.Pointer, localPoint: Phaser.Point): void; @@ -8211,15 +8211,15 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Input.reset is called automatically during a State change or if a game loses focus / visibility. * To control control the reset manually set {@link Phaser.InputManager.resetLocked} to `true`. * - * @param hard - A soft reset won't reset any events or callbacks that are bound. A hard reset will. - Default: false + * @param hard A soft reset won't reset any events or callbacks that are bound. A hard reset will. - Default: false */ reset(hard?: boolean): void; /** * Resets the speed and old position properties. * - * @param x - Sets the oldPosition.x value. - * @param y - Sets the oldPosition.y value. + * @param x Sets the oldPosition.x value. + * @param y Sets the oldPosition.y value. */ resetSpeed(x: number, y: number): void; @@ -8227,16 +8227,16 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Find the first free Pointer object and start it, passing in the event data. * This is called automatically by Phaser.Touch and Phaser.MSPointer. * - * @param event - The event data from the Touch event. - * @return - The Pointer object that was started or null if no Pointer object is available. + * @param event The event data from the Touch event. + * @return The Pointer object that was started or null if no Pointer object is available. */ startPointer(event: any): Phaser.Pointer; /** * Stops the matching Pointer object, passing in the event data. * - * @param event - The event data from the Touch event. - * @return - The Pointer object that was stopped or null if no Pointer object is available. + * @param event The event data from the Touch event. + * @return The Pointer object that was stopped or null if no Pointer object is available. */ stopPointer(event: any): Phaser.Pointer; @@ -8249,8 +8249,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Updates the matching Pointer object, passing in the event data. * This is called automatically and should not normally need to be invoked. * - * @param event - The event data from the Touch event. - * @return - The Pointer object that was updated; null if no pointer was updated. + * @param event The event data from the Touch event. + * @return The Pointer object that was updated; null if no pointer was updated. */ updatePointer(event: any): Phaser.Pointer; @@ -8266,7 +8266,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * The Input Handler is bound to a specific Sprite and is responsible for managing all Input events on that Sprite. * - * @param sprite - The Sprite object to which this Input Handler belongs. + * @param sprite The Sprite object to which this Input Handler belongs. */ constructor(sprite: Phaser.Sprite); @@ -8328,14 +8328,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Warning: EXPERIMENTAL * - * @param x - + * @param x */ globalToLocalX(x: number): number; /** * Warning: EXPERIMENTAL * - * @param y - + * @param y */ globalToLocalY(y: number): number; @@ -8448,10 +8448,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Runs a pixel perfect check against the given x/y coordinates of the Sprite this InputHandler is bound to. * It compares the alpha value of the pixel and if >= InputHandler.pixelPerfectAlpha it returns true. * - * @param x - The x coordinate to check. - * @param y - The y coordinate to check. - * @param pointer - The pointer to get the x/y coordinate from if not passed as the first two parameters. - * @return - true if there is the alpha of the pixel is >= InputHandler.pixelPerfectAlpha + * @param x The x coordinate to check. + * @param y The y coordinate to check. + * @param pointer The pointer to get the x/y coordinate from if not passed as the first two parameters. + * @return true if there is the alpha of the pixel is >= InputHandler.pixelPerfectAlpha */ checkPixel(x: number, y: number, pointer?: Phaser.Pointer): boolean; @@ -8459,9 +8459,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Checks if the given pointer is both down and over the Sprite this InputHandler belongs to. * Use the `fastTest` flag is to quickly check just the bounding hit area even if `InputHandler.pixelPerfectOver` is `true`. * - * @param pointer - - * @param fastTest - Force a simple hit area check even if `pixelPerfectOver` is true for this object? - Default: false - * @return - True if the pointer is down, otherwise false. + * @param pointer + * @param fastTest Force a simple hit area check even if `pixelPerfectOver` is true for this object? - Default: false + * @return True if the pointer is down, otherwise false. */ checkPointerDown(pointer: Phaser.Pointer, fastTest?: boolean): boolean; @@ -8469,9 +8469,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Checks if the given pointer is over the Sprite this InputHandler belongs to. * Use the `fastTest` flag is to quickly check just the bounding hit area even if `InputHandler.pixelPerfectOver` is `true`. * - * @param pointer - - * @param fastTest - Force a simple hit area check even if `pixelPerfectOver` is true for this object? - Default: false - * @return - + * @param pointer + * @param fastTest Force a simple hit area check even if `pixelPerfectOver` is true for this object? - Default: false + * @return */ checkPointerOver(pointer: Phaser.Pointer, fastTest?: boolean): boolean; @@ -8493,20 +8493,20 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * If the pointer is currently over this Sprite this returns how long it has been there for in milliseconds. * - * @param pointer - - * @return - The number of milliseconds the pointer has been pressed down on the Sprite, or -1 if not over. + * @param pointer + * @return The number of milliseconds the pointer has been pressed down on the Sprite, or -1 if not over. */ downDuration(pointer: Phaser.Pointer): number; /** * Make this Sprite draggable by the mouse. You can also optionally set mouseStartDragCallback and mouseStopDragCallback * - * @param lockCenter - If false the Sprite will drag from where you click it minus the dragOffset. If true it will center itself to the tip of the mouse pointer. - Default: false - * @param bringToTop - If true the Sprite will be bought to the top of the rendering list in its current Group. - Default: false - * @param pixelPerfect - If true it will use a pixel perfect test to see if you clicked the Sprite. False uses the bounding box. - Default: false - * @param alphaThreshold - If using pixel perfect collision this specifies the alpha level from 0 to 255 above which a collision is processed. - Default: 255 - * @param boundsRect - If you want to restrict the drag of this sprite to a specific Rectangle, pass the Phaser.Rectangle here, otherwise it's free to drag anywhere. - Default: null - * @param boundsSprite - If you want to restrict the drag of this sprite to within the bounding box of another sprite, pass it here. - Default: null + * @param lockCenter If false the Sprite will drag from where you click it minus the dragOffset. If true it will center itself to the tip of the mouse pointer. - Default: false + * @param bringToTop If true the Sprite will be bought to the top of the rendering list in its current Group. - Default: false + * @param pixelPerfect If true it will use a pixel perfect test to see if you clicked the Sprite. False uses the bounding box. - Default: false + * @param alphaThreshold If using pixel perfect collision this specifies the alpha level from 0 to 255 above which a collision is processed. - Default: 255 + * @param boundsRect If you want to restrict the drag of this sprite to a specific Rectangle, pass the Phaser.Rectangle here, otherwise it's free to drag anywhere. - Default: null + * @param boundsSprite If you want to restrict the drag of this sprite to within the bounding box of another sprite, pass it here. - Default: null */ enableDrag(lockCenter?: boolean, bringToTop?: boolean, pixelPerfect?: boolean, alphaThreshold?: number, boundsRect?: Phaser.Rectangle, boundsSprite?: Phaser.Sprite): void; @@ -8514,134 +8514,134 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Make this Sprite snap to the given grid either during drag or when it's released. * For example 16x16 as the snapX and snapY would make the sprite snap to every 16 pixels. * - * @param snapX - The width of the grid cell to snap to. - * @param snapY - The height of the grid cell to snap to. - * @param onDrag - If true the sprite will snap to the grid while being dragged. - Default: true - * @param onRelease - If true the sprite will snap to the grid when released. - Default: false - * @param snapOffsetX - Used to offset the top-left starting point of the snap grid. - Default: 0 - * @param snapOffsetX - Used to offset the top-left starting point of the snap grid. - Default: 0 + * @param snapX The width of the grid cell to snap to. + * @param snapY The height of the grid cell to snap to. + * @param onDrag If true the sprite will snap to the grid while being dragged. - Default: true + * @param onRelease If true the sprite will snap to the grid when released. - Default: false + * @param snapOffsetX Used to offset the top-left starting point of the snap grid. - Default: 0 + * @param snapOffsetX Used to offset the top-left starting point of the snap grid. - Default: 0 */ enableSnap(snapX: number, snapY: number, onDrag?: boolean, onRelease?: boolean, snapOffsetX?: number, snapOffsetY?: number): void; /** * Is this object using pixel perfect checking? - * @return - True if the this InputHandler has either `pixelPerfectClick` or `pixelPerfectOver` set to `true`. + * @return True if the this InputHandler has either `pixelPerfectClick` or `pixelPerfectOver` set to `true`. */ isPixelPerfect(): boolean; /** * Returns true if the pointer has left the Sprite within the specified delay time (defaults to 500ms, half a second) * - * @param pointer - - * @param delay - The time below which the pointer is considered as just out. - * @return - + * @param pointer + * @param delay The time below which the pointer is considered as just out. + * @return */ justOut(pointer: number, delay: number): boolean; /** * Returns true if the pointer has entered the Sprite within the specified delay time (defaults to 500ms, half a second) * - * @param pointer - - * @param delay - The time below which the pointer is considered as just over. - * @return - + * @param pointer + * @param delay The time below which the pointer is considered as just over. + * @return */ justOver(pointer: number, delay: number): boolean; /** * Returns true if the pointer has touched or clicked on the Sprite within the specified delay time (defaults to 500ms, half a second) * - * @param pointer - - * @param delay - The time below which the pointer is considered as just over. - * @return - + * @param pointer + * @param delay The time below which the pointer is considered as just over. + * @return */ justPressed(pointer: number, delay: number): boolean; /** * Returns true if the pointer was touching this Sprite, but has been released within the specified delay time (defaults to 500ms, half a second) * - * @param pointer - - * @param delay - The time below which the pointer is considered as just out. - * @return - + * @param pointer + * @param delay The time below which the pointer is considered as just out. + * @return */ justReleased(pointer: number, delay: number): boolean; /** * If the pointer is currently over this Sprite this returns how long it has been there for in milliseconds. * - * @param pointer - - * @return - The number of milliseconds the pointer has been over the Sprite, or -1 if not over. + * @param pointer + * @return The number of milliseconds the pointer has been over the Sprite, or -1 if not over. */ overDuration(pointer: Phaser.Pointer): number; /** * If the Pointer is down this returns true. Please note that it only checks if the Pointer is down, not if it's down over any specific Sprite. * - * @param pointer - The index of the pointer to check. You can get this from Phaser.Pointer.id. - * @return - - True if the given pointer is down, otherwise false. + * @param pointer The index of the pointer to check. You can get this from Phaser.Pointer.id. + * @return - True if the given pointer is down, otherwise false. */ pointerDown(pointer: number): boolean; /** * Is this sprite being dragged by the mouse or not? * - * @param pointer - - * @return - True if the pointer is dragging an object, otherwise false. + * @param pointer + * @return True if the pointer is dragging an object, otherwise false. */ pointerDragged(pointer: Phaser.Pointer): boolean; /** * Is the Pointer outside of this Sprite? * - * @param index - The ID number of a Pointer to check. If you don't provide a number it will check all Pointers. - * @return - True if the given pointer (if a index was given, or any pointer if not) is out of this object. + * @param index The ID number of a Pointer to check. If you don't provide a number it will check all Pointers. + * @return True if the given pointer (if a index was given, or any pointer if not) is out of this object. */ pointerOut(index: number): boolean; /** * Is the Pointer over this Sprite? * - * @param index - The ID number of a Pointer to check. If you don't provide a number it will check all Pointers. - * @return - - True if the given pointer (if a index was given, or any pointer if not) is over this object. + * @param index The ID number of a Pointer to check. If you don't provide a number it will check all Pointers. + * @return - True if the given pointer (if a index was given, or any pointer if not) is over this object. */ pointerOver(index: number): boolean; /** * A timestamp representing when the Pointer first touched the touchscreen. * - * @param pointer - The index of the pointer to check. You can get this from Phaser.Pointer.id. - * @return - + * @param pointer The index of the pointer to check. You can get this from Phaser.Pointer.id. + * @return */ pointerTimeDown(pointer: Phaser.Pointer): number; /** * A timestamp representing when the Pointer left the touchscreen. * - * @param pointer - - * @return - + * @param pointer + * @return */ pointerTimeOut(pointer: Phaser.Pointer): number; /** * A timestamp representing when the Pointer first touched the touchscreen. * - * @param pointer - - * @return - + * @param pointer + * @return */ pointerTimeOver(pointer: number): number; /** * A timestamp representing when the Pointer left the touchscreen. * - * @param pointer - - * @return - + * @param pointer + * @return */ pointerTimeUp(pointer: number): number; /** * If the Pointer is up this returns true. Please note that it only checks if the Pointer is up, not if it's up over any specific Sprite. * - * @param pointer - The index of the pointer to check. You can get this from Phaser.Pointer.id. - * @return - - True if the given pointer is up, otherwise false. + * @param pointer The index of the pointer to check. You can get this from Phaser.Pointer.id. + * @return - True if the given pointer is up, otherwise false. */ pointerUp(pointer: number): boolean; @@ -8649,8 +8649,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The x coordinate of the Input pointer, relative to the top-left of the parent Sprite. * This value is only set when the pointer is over this Sprite. * - * @param pointer - The index of the pointer to check. You can get this from Phaser.Pointer.id. - * @return - The x coordinate of the Input pointer. + * @param pointer The index of the pointer to check. You can get this from Phaser.Pointer.id. + * @return The x coordinate of the Input pointer. */ pointerX(pointer: number): number; @@ -8658,8 +8658,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The y coordinate of the Input pointer, relative to the top-left of the parent Sprite * This value is only set when the pointer is over this Sprite. * - * @param pointer - The index of the pointer to check. You can get this from Phaser.Pointer.id. - * @return - The y coordinate of the Input pointer. + * @param pointer The index of the pointer to check. You can get this from Phaser.Pointer.id. + * @return The y coordinate of the Input pointer. */ pointerY(pointer: number): number; @@ -8671,24 +8671,24 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Restricts this sprite to drag movement only on the given axis. Note: If both are set to false the sprite will never move! * - * @param allowHorizontal - To enable the sprite to be dragged horizontally set to true, otherwise false. - Default: true - * @param allowVertical - To enable the sprite to be dragged vertically set to true, otherwise false. - Default: true + * @param allowHorizontal To enable the sprite to be dragged horizontally set to true, otherwise false. - Default: true + * @param allowVertical To enable the sprite to be dragged vertically set to true, otherwise false. - Default: true */ setDragLock(allowHorizontal?: boolean, allowVertical?: boolean): void; /** * Starts the Input Handler running. This is called automatically when you enable input on a Sprite, or can be called directly if you need to set a specific priority. * - * @param priority - Higher priority sprites take click priority over low-priority sprites when they are stacked on-top of each other. - * @param useHandCursor - If true the Sprite will show the hand cursor on mouse-over (doesn't apply to mobile browsers) - * @return - The Sprite object to which the Input Handler is bound. + * @param priority Higher priority sprites take click priority over low-priority sprites when they are stacked on-top of each other. + * @param useHandCursor If true the Sprite will show the hand cursor on mouse-over (doesn't apply to mobile browsers) + * @return The Sprite object to which the Input Handler is bound. */ start(priority: number, useHandCursor: boolean): Phaser.Sprite; /** * Called by Pointer when drag starts on this Sprite. Should not usually be called directly. * - * @param pointer - + * @param pointer */ startDrag(pointer: Phaser.Pointer): void; @@ -8700,22 +8700,22 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Called by Pointer when drag is stopped on this Sprite. Should not usually be called directly. * - * @param pointer - + * @param pointer */ stopDrag(pointer: Phaser.Pointer): void; /** * Update. * - * @param pointer - + * @param pointer */ update(pointer: Phaser.Pointer): void; /** * Updates the Pointer drag on this Sprite. * - * @param pointer - - * @return - + * @param pointer + * @return */ updateDrag(pointer: Phaser.Pointer): boolean; @@ -8723,10 +8723,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Checks if the object this InputHandler is bound to is valid for consideration in the Pointer move event. * This is called by Phaser.Pointer and shouldn't typically be called directly. * - * @param highestID - The highest ID currently processed by the Pointer. - * @param highestRenderID - The highest Render Order ID currently processed by the Pointer. - * @param includePixelPerfect - If this object has `pixelPerfectClick` or `pixelPerfectOver` set should it be considered as valid? - Default: true - * @return - True if the object this InputHandler is bound to should be considered as valid for input detection. + * @param highestID The highest ID currently processed by the Pointer. + * @param highestRenderID The highest Render Order ID currently processed by the Pointer. + * @param includePixelPerfect If this object has `pixelPerfectClick` or `pixelPerfectOver` set should it be considered as valid? - Default: true + * @return True if the object this InputHandler is bound to should be considered as valid for input detection. */ validForInput(highestID: number, highestRenderID: number, includePixelPerfect?: boolean): boolean; @@ -8742,8 +8742,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * If you need more fine-grained control over the handling of specific keys you can create and use Phaser.Key objects. * - * @param game - Current game instance. - * @param keycode - The key code this Key is responsible for. + * @param game Current game instance. + * @param keycode The key code this Key is responsible for. */ constructor(game: Phaser.Game, keycode: number); @@ -8854,22 +8854,22 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, * or was pressed down longer ago than then given duration. * - * @param duration - The duration within which the key is considered as being just pressed. Given in ms. - Default: 50 - * @return - True if the key was pressed down within the given duration. + * @param duration The duration within which the key is considered as being just pressed. Given in ms. - Default: 50 + * @return True if the key was pressed down within the given duration. */ downDuration(duration?: number): boolean; /** * Called automatically by Phaser.Keyboard. * - * @param event - The DOM event that triggered this. + * @param event The DOM event that triggered this. */ processKeyDown(event: KeyboardEvent): void; /** * Called automatically by Phaser.Keyboard. * - * @param event - The DOM event that triggered this. + * @param event The DOM event that triggered this. */ processKeyUp(event: KeyboardEvent): void; @@ -8879,7 +8879,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * This sets isDown to false, isUp to true, resets the time to be the current time, and _enables_ the key. * In addition, if it is a "hard reset", it clears clears any callbacks associated with the onDown and onUp events and removes the onHoldCallback. * - * @param hard - A soft reset won't reset any events or callbacks; a hard reset will. - Default: true + * @param hard A soft reset won't reset any events or callbacks; a hard reset will. - Default: true */ reset(hard?: boolean): void; @@ -8892,8 +8892,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, * or was pressed down longer ago than then given duration. * - * @param duration - The duration within which the key is considered as being just released. Given in ms. - Default: 50 - * @return - True if the key was released within the given duration. + * @param duration The duration within which the key is considered as being just released. Given in ms. - Default: 50 + * @return True if the key was released within the given duration. */ upDuration(duration?: number): boolean; @@ -8915,7 +8915,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * _Be aware_ that many keyboards are unable to process certain combinations of keys due to hardware * limitations known as ghosting. Full details here: http://www.html5gamedevs.com/topic/4876-impossible-to-use-more-than-2-keyboard-input-buttons-at-the-same-time/ * - * @param game - A reference to the currently running game. + * @param game A reference to the currently running game. */ constructor(game: Phaser.Game); @@ -9077,10 +9077,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Add callbacks to the Keyboard handler so that each time a key is pressed down or released the callbacks are activated. * - * @param context - The context under which the callbacks are run. - * @param onDown - This callback is invoked every time a key is pressed down. - Default: null - * @param onUp - This callback is invoked every time a key is released. - Default: null - * @param onPress - This callback is invoked every time the onkeypress event is raised. - Default: null + * @param context The context under which the callbacks are run. + * @param onDown This callback is invoked every time a key is pressed down. - Default: null + * @param onUp This callback is invoked every time a key is released. - Default: null + * @param onPress This callback is invoked every time the onkeypress event is raised. - Default: null */ addCallbacks(context: any, onDown?: Function, onUp?: Function, onPress?: Function): void; @@ -9088,8 +9088,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If you need more fine-grained control over a Key you can create a new Phaser.Key object via this method. * The Key object can then be polled, have events attached to it, etc. * - * @param keycode - The keycode of the key, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR - * @return - The Key object which you can store locally and reference directly. + * @param keycode The keycode of the key, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR + * @return The Key object which you can store locally and reference directly. */ addKey(keycode: number): Phaser.Key; @@ -9099,13 +9099,13 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * You can use addKeyCapture to consume the keyboard event for specific keys so it doesn't bubble up to the the browser. * Pass in either a single keycode or an array/hash of keycodes. * - * @param keycode - Either a single numeric keycode or an array/hash of keycodes: [65, 67, 68]. + * @param keycode Either a single numeric keycode or an array/hash of keycodes: [65, 67, 68]. */ addKeyCapture(keycode: any): void; /** * Creates and returns an object containing 4 hotkeys for Up, Down, Left and Right. - * @return - An object containing properties: up, down, left and right. Which can be polled like any other Phaser.Key object. + * @return An object containing properties: up, down, left and right. Which can be polled like any other Phaser.Key object. */ createCursorKeys(): Phaser.CursorKeys; @@ -9124,59 +9124,59 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, * or was pressed down longer ago than then given duration. * - * @param keycode - The keycode of the key to check, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR - * @param duration - The duration within which the key is considered as being just pressed. Given in ms. - Default: 50 - * @return - True if the key was pressed down within the given duration, false if not or null if the Key wasn't found. + * @param keycode The keycode of the key to check, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR + * @param duration The duration within which the key is considered as being just pressed. Given in ms. - Default: 50 + * @return True if the key was pressed down within the given duration, false if not or null if the Key wasn't found. */ downDuration(keycode: number, duration?: number): boolean; /** * Returns true of the key is currently pressed down. Note that it can only detect key presses on the web browser. * - * @param keycode - The keycode of the key to check, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR - * @return - True if the key is currently down, false if not or null if the Key wasn't found. + * @param keycode The keycode of the key to check, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR + * @return True if the key is currently down, false if not or null if the Key wasn't found. */ isDown(keycode: number): boolean; /** * Process the keydown event. * - * @param event - + * @param event */ processKeyDown(event: KeyboardEvent): void; /** * Process the keypress event. * - * @param event - + * @param event */ processKeyPress(event: KeyboardEvent): void; /** * Process the keyup event. * - * @param event - + * @param event */ processKeyUp(event: KeyboardEvent): void; /** * Removes a Key object from the Keyboard manager. * - * @param keycode - The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR + * @param keycode The keycode of the key to remove, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR */ removeKey(keycode: number): void; /** * Removes an existing key capture. * - * @param keycode - + * @param keycode */ removeKeyCapture(keycode: number): void; /** * Resets all Keys. * - * @param hard - A soft reset won't reset any events or callbacks that are bound to the Keys. A hard reset will. - Default: true + * @param hard A soft reset won't reset any events or callbacks that are bound to the Keys. A hard reset will. - Default: true */ reset(hard?: boolean): void; @@ -9200,9 +9200,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Returns `true` if the Key was pressed down within the `duration` value given, or `false` if it either isn't down, * or was pressed down longer ago than then given duration. * - * @param keycode - The keycode of the key to check, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR - * @param duration - The duration within which the key is considered as being just released. Given in ms. - Default: 50 - * @return - True if the key was released within the given duration, false if not or null if the Key wasn't found. + * @param keycode The keycode of the key to check, i.e. Phaser.Keyboard.UP or Phaser.Keyboard.SPACEBAR + * @param duration The duration within which the key is considered as being just released. Given in ms. - Default: 50 + * @return True if the key was released within the given duration, false if not or null if the Key wasn't found. */ upDuration(keycode: number, duration?: number): boolean; @@ -9218,10 +9218,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Creates a new Line object with a start and an end point. * - * @param x1 - The x coordinate of the start of the line. - Default: 0 - * @param y1 - The y coordinate of the start of the line. - Default: 0 - * @param x2 - The x coordinate of the end of the line. - Default: 0 - * @param y2 - The y coordinate of the end of the line. - Default: 0 + * @param x1 The x coordinate of the start of the line. - Default: 0 + * @param y1 The y coordinate of the start of the line. - Default: 0 + * @param x2 The x coordinate of the end of the line. - Default: 0 + * @param y2 The y coordinate of the end of the line. - Default: 0 */ constructor(x1?: number, y1?: number, x2?: number, y2?: number); @@ -9313,13 +9313,13 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Returns the intersection segment of AB and EF as a Point, or null if there is no intersection. * Adapted from code by Keith Hair * - * @param a - The start of the first Line to be checked. - * @param b - The end of the first line to be checked. - * @param e - The start of the second Line to be checked. - * @param f - The end of the second line to be checked. - * @param asSegment - If true it will check for segment intersection, otherwise full line intersection. - Default: true - * @param result - A Point object to store the result in, if not given a new one will be created. - * @return - The intersection segment of the two lines as a Point, or null if there is no intersection. + * @param a The start of the first Line to be checked. + * @param b The end of the first line to be checked. + * @param e The start of the second Line to be checked. + * @param f The end of the second line to be checked. + * @param asSegment If true it will check for segment intersection, otherwise full line intersection. - Default: true + * @param result A Point object to store the result in, if not given a new one will be created. + * @return The intersection segment of the two lines as a Point, or null if there is no intersection. */ static intersectsPoints(a: Phaser.Point, b: Phaser.Point, e: Phaser.Point, f: Phaser.Point, asSegment?: boolean, result?: Phaser.Point): Phaser.Point; @@ -9328,10 +9328,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If asSegment is true it will check for segment intersection. If asSegment is false it will check for line intersection. * Returns the intersection segment of AB and EF as a Point, or null if there is no intersection. * - * @param line - The line to check against this one. - * @param asSegment - If true it will check for segment intersection, otherwise full line intersection. - Default: true - * @param result - A Point object to store the result in, if not given a new one will be created. - * @return - The intersection segment of the two lines as a Point, or null if there is no intersection. + * @param line The line to check against this one. + * @param asSegment If true it will check for segment intersection, otherwise full line intersection. - Default: true + * @param result A Point object to store the result in, if not given a new one will be created. + * @return The intersection segment of the two lines as a Point, or null if there is no intersection. */ static intersects(a: Phaser.Line, b: Phaser.Line, asSegment?: boolean, result?: Phaser.Point): Phaser.Point; @@ -9339,8 +9339,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Returns the reflected angle between two lines. * This is the outgoing angle based on the angle of this line and the normalAngle of the given line. * - * @param line - The line to reflect off this line. - * @return - The reflected angle in radians. + * @param line The line to reflect off this line. + * @return The reflected angle in radians. */ static reflect(a: Phaser.Line, b: Phaser.Line): number; @@ -9348,8 +9348,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Returns a new Line object with the same values for the start and end properties as this Line object. * - * @param output - Optional Line object. If given the values will be set into the object, otherwise a brand new Line object will be created and returned. - * @return - The cloned Line object. + * @param output Optional Line object. If given the values will be set into the object, otherwise a brand new Line object will be created and returned. + * @return The cloned Line object. */ clone(output: Phaser.Line): Phaser.Line; @@ -9357,20 +9357,20 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Using Bresenham's line algorithm this will return an array of all coordinates on this line. * The start and end points are rounded before this runs as the algorithm works on integers. * - * @param stepRate - How many steps will we return? 1 = every coordinate on the line, 2 = every other coordinate, etc. - Default: 1 - * @param results - The array to store the results in. If not provided a new one will be generated. - * @return - An array of coordinates. + * @param stepRate How many steps will we return? 1 = every coordinate on the line, 2 = every other coordinate, etc. - Default: 1 + * @param results The array to store the results in. If not provided a new one will be generated. + * @return An array of coordinates. */ coordinatesOnLine(stepRate: number, results: any[]): any[]; /** * Sets this line to start at the given `x` and `y` coordinates and for the segment to extend at `angle` for the given `length`. * - * @param x - The x coordinate of the start of the line. - * @param y - The y coordinate of the start of the line. - * @param angle - The angle of the line in radians. - * @param length - The length of the line in pixels. - * @return - This line object + * @param x The x coordinate of the start of the line. + * @param y The y coordinate of the start of the line. + * @param angle The angle of the line in radians. + * @param length The length of the line in pixels. + * @return This line object */ fromAngle(x: number, y: number, angle: number, length: number): Phaser.Line; @@ -9378,10 +9378,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Sets the line to match the x/y coordinates of the two given sprites. * Can optionally be calculated from their center coordinates. * - * @param startSprite - The coordinates of this Sprite will be set to the Line.start point. - * @param endSprite - The coordinates of this Sprite will be set to the Line.start point. - * @param useCenter - If true it will use startSprite.center.x, if false startSprite.x. Note that Sprites don't have a center property by default, so only enable if you've over-ridden your Sprite with a custom class. - Default: false - * @return - This line object + * @param startSprite The coordinates of this Sprite will be set to the Line.start point. + * @param endSprite The coordinates of this Sprite will be set to the Line.start point. + * @param useCenter If true it will use startSprite.center.x, if false startSprite.x. Note that Sprites don't have a center property by default, so only enable if you've over-ridden your Sprite with a custom class. - Default: false + * @return This line object */ fromSprite(startSprite: Phaser.Sprite, endSprite: Phaser.Sprite, useCenter?: boolean): Phaser.Line; @@ -9390,28 +9390,28 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If asSegment is true it will check for segment intersection. If asSegment is false it will check for line intersection. * Returns the intersection segment of AB and EF as a Point, or null if there is no intersection. * - * @param line - The line to check against this one. - * @param asSegment - If true it will check for segment intersection, otherwise full line intersection. - Default: true - * @param result - A Point object to store the result in, if not given a new one will be created. - * @return - The intersection segment of the two lines as a Point, or null if there is no intersection. + * @param line The line to check against this one. + * @param asSegment If true it will check for segment intersection, otherwise full line intersection. - Default: true + * @param result A Point object to store the result in, if not given a new one will be created. + * @return The intersection segment of the two lines as a Point, or null if there is no intersection. */ intersects(line: Phaser.Line, asSegment?: boolean, result?: Phaser.Point): Phaser.Point; /** * Tests if the given coordinates fall on this line. See pointOnSegment to test against just the line segment. * - * @param x - The line to check against this one. - * @param y - The line to check against this one. - * @return - True if the point is on the line, false if not. + * @param x The line to check against this one. + * @param y The line to check against this one. + * @return True if the point is on the line, false if not. */ pointOnLine(x: number, y: number): boolean; /** * Tests if the given coordinates fall on this line and within the segment. See pointOnLine to test against just the line. * - * @param x - The line to check against this one. - * @param y - The line to check against this one. - * @return - True if the point is on the line and segment, false if not. + * @param x The line to check against this one. + * @param y The line to check against this one. + * @return True if the point is on the line and segment, false if not. */ pointOnSegment(x: number, y: number): boolean; @@ -9419,19 +9419,19 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Returns the reflected angle between two lines. * This is the outgoing angle based on the angle of this line and the normalAngle of the given line. * - * @param line - The line to reflect off this line. - * @return - The reflected angle in radians. + * @param line The line to reflect off this line. + * @return The reflected angle in radians. */ reflect(line: Phaser.Line): number; /** * Sets the components of the Line to the specified values. * - * @param x1 - The x coordinate of the start of the line. - Default: 0 - * @param y1 - The y coordinate of the start of the line. - Default: 0 - * @param x2 - The x coordinate of the end of the line. - Default: 0 - * @param y2 - The y coordinate of the end of the line. - Default: 0 - * @return - This line object + * @param x1 The x coordinate of the start of the line. - Default: 0 + * @param y1 The y coordinate of the start of the line. - Default: 0 + * @param x2 The x coordinate of the end of the line. - Default: 0 + * @param y2 The y coordinate of the end of the line. - Default: 0 + * @return This line object */ setTo(x1?: number, y1?: number, x2?: number, y2?: number): Phaser.Line; @@ -9483,8 +9483,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Adds a new element to this linked list. * - * @param item - The element to add to this list. Can be a Phaser.Sprite or any other object you need to quickly iterate through. - * @return - The item that was added. + * @param item The element to add to this list. Can be a Phaser.Sprite or any other object you need to quickly iterate through. + * @return The item that was added. */ add(item: any): any; @@ -9492,14 +9492,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Calls a function on all members of this list, using the member as the context for the callback. * The function must exist on the member. * - * @param callback - The function to call. + * @param callback The function to call. */ callAll(callback: Function): void; /** * Removes the given element from this linked list if it exists. * - * @param item - The item to be removed from the list. + * @param item The item to be removed from the list. */ remove(item: any): void; @@ -9526,7 +9526,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Texture Atlases can be created with tools such as [Texture Packer](https://www.codeandweb.com/texturepacker/phaser) and * [Shoebox](http://renderhjs.net/shoebox/) * - * @param game - A reference to the currently running game. + * @param game A reference to the currently running game. */ constructor(game: Phaser.Game); @@ -9625,10 +9625,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Internal function that adds a new entry to the file list. Do not call directly. * - * @param type - The type of resource to add to the list (image, audio, xml, etc). - * @param key - The unique Cache ID key of this resource. - * @param url - The URL the asset will be loaded from. - * @param properties - Any additional properties needed to load the file. + * @param type The type of resource to add to the list (image, audio, xml, etc). + * @param key The unique Cache ID key of this resource. + * @param url The URL the asset will be loaded from. + * @param properties Any additional properties needed to load the file. */ addToFileList(type: string, key: string, url: string, properties: any): void; @@ -9637,12 +9637,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Texture Atlases can be created with tools such as [Texture Packer](https://www.codeandweb.com/texturepacker/phaser) and * [Shoebox](http://renderhjs.net/shoebox/) * - * @param key - Unique asset key of the texture atlas file. - * @param textureURL - The url of the texture atlas image file. - * @param atlasURL - The url of the texture atlas data file (json/xml). You don't need this if you are passing an atlasData object instead. - * @param atlasData - A JSON or XML data object. You don't need this if the data is being loaded from a URL. - * @param format - A value describing the format of the data, the default is Phaser.Loader.TEXTURE_ATLAS_JSON_ARRAY. - * @return - This Loader instance. + * @param key Unique asset key of the texture atlas file. + * @param textureURL The url of the texture atlas image file. + * @param atlasURL The url of the texture atlas data file (json/xml). You don't need this if you are passing an atlasData object instead. + * @param atlasData A JSON or XML data object. You don't need this if the data is being loaded from a URL. + * @param format A value describing the format of the data, the default is Phaser.Loader.TEXTURE_ATLAS_JSON_ARRAY. + * @return This Loader instance. */ atlas(key: string, textureURL: string, atlasURL?: string, atlasData?: any, format?: number): Phaser.Loader; @@ -9651,11 +9651,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Texture Atlases can be created with tools such as [Texture Packer](https://www.codeandweb.com/texturepacker/phaser) and * [Shoebox](http://renderhjs.net/shoebox/) * - * @param key - Unique asset key of the texture atlas file. - * @param textureURL - The url of the texture atlas image file. - * @param atlasURL - The url of the texture atlas data file (json/xml). You don't need this if you are passing an atlasData object instead. - * @param atlasData - A JSON or XML data object. You don't need this if the data is being loaded from a URL. - * @return - This Loader instance. + * @param key Unique asset key of the texture atlas file. + * @param textureURL The url of the texture atlas image file. + * @param atlasURL The url of the texture atlas data file (json/xml). You don't need this if you are passing an atlasData object instead. + * @param atlasData A JSON or XML data object. You don't need this if the data is being loaded from a URL. + * @return This Loader instance. */ atlasJSONArray(key: string, textureURL: string, atlasURL?: string, atlasData?: any): Phaser.Loader; @@ -9664,32 +9664,32 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Texture Atlases can be created with tools such as [Texture Packer](https://www.codeandweb.com/texturepacker/phaser) and * [Shoebox](http://renderhjs.net/shoebox/) * - * @param key - Unique asset key of the texture atlas file. - * @param textureURL - The url of the texture atlas image file. - * @param atlasURL - The url of the texture atlas data file (json/xml). You don't need this if you are passing an atlasData object instead. - * @param atlasData - A JSON or XML data object. You don't need this if the data is being loaded from a URL. - * @return - This Loader instance. + * @param key Unique asset key of the texture atlas file. + * @param textureURL The url of the texture atlas image file. + * @param atlasURL The url of the texture atlas data file (json/xml). You don't need this if you are passing an atlasData object instead. + * @param atlasData A JSON or XML data object. You don't need this if the data is being loaded from a URL. + * @return This Loader instance. */ atlasJSONHash(key: string, textureURL: string, atlasURL?: string, atlasData?: any): Phaser.Loader; /** * Add a new texture atlas to the loader. This atlas uses the Starling XML data format. * - * @param key - Unique asset key of the texture atlas file. - * @param textureURL - The url of the texture atlas image file. - * @param atlasURL - The url of the texture atlas data file (json/xml). You don't need this if you are passing an atlasData object instead. - * @param atlasData - A JSON or XML data object. You don't need this if the data is being loaded from a URL. - * @return - This Loader instance. + * @param key Unique asset key of the texture atlas file. + * @param textureURL The url of the texture atlas image file. + * @param atlasURL The url of the texture atlas data file (json/xml). You don't need this if you are passing an atlasData object instead. + * @param atlasData A JSON or XML data object. You don't need this if the data is being loaded from a URL. + * @return This Loader instance. */ atlasXML(key: string, textureURL: string, atlasURL?: string, atlasData?: any): Phaser.Loader; /** * Add a new audio file to the loader. * - * @param key - Unique asset key of the audio file. - * @param urls - An array containing the URLs of the audio files, i.e.: [ 'jump.mp3', 'jump.ogg', 'jump.m4a' ] or a single string containing just one URL. BLOB urls are supported, but note that Phaser will not validate the audio file's type if a BLOB is provided; the user should ensure that a BLOB url is playable. - * @param autoDecode - When using Web Audio the audio files can either be decoded at load time or run-time. They can't be played until they are decoded, but this let's you control when that happens. Decoding is a non-blocking async process. - * @return - This Loader instance. + * @param key Unique asset key of the audio file. + * @param urls An array containing the URLs of the audio files, i.e.: [ 'jump.mp3', 'jump.ogg', 'jump.m4a' ] or a single string containing just one URL. BLOB urls are supported, but note that Phaser will not validate the audio file's type if a BLOB is provided; the user should ensure that a BLOB url is playable. + * @param autoDecode When using Web Audio the audio files can either be decoded at load time or run-time. They can't be played until they are decoded, but this let's you control when that happens. Decoding is a non-blocking async process. + * @return This Loader instance. */ audio(key: string, urls: any, autoDecode?: boolean): Phaser.Loader; @@ -9697,10 +9697,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Add a new audiosprite file to the loader. Audio Sprites are a combination of audio files and a JSON configuration. * The JSON follows the format of that created by https://github.com/tonistiigi/audiosprite * - * @param key - Unique asset key of the audio file. - * @param urls - An array containing the URLs of the audio files, i.e.: [ 'audiosprite.mp3', 'audiosprite.ogg', 'audiosprite.m4a' ] or a single string containing just one URL. - * @param atlasURL - The URL of the audiosprite configuration json. - * @return - This Loader instance. + * @param key Unique asset key of the audio file. + * @param urls An array containing the URLs of the audio files, i.e.: [ 'audiosprite.mp3', 'audiosprite.ogg', 'audiosprite.m4a' ] or a single string containing just one URL. + * @param atlasURL The URL of the audiosprite configuration json. + * @return This Loader instance. */ audiosprite(key: string, urls: any, atlasurl: string): Phaser.Loader; @@ -9709,24 +9709,24 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * When the callback is called it will be passed 2 parameters: the key of the file and the file data. * WARNING: If you specify a callback, the file data will be set to whatever your callback returns. So always return the data object, even if you didn't modify it. * - * @param key - Unique asset key of the binary file. - * @param url - URL of the binary file. - * @param callback - Optional callback that will be passed the file after loading, so you can perform additional processing on it. - * @param callbackContext - The context under which the callback will be applied. If not specified it will use the callback itself as the context. - * @return - This Loader instance. + * @param key Unique asset key of the binary file. + * @param url URL of the binary file. + * @param callback Optional callback that will be passed the file after loading, so you can perform additional processing on it. + * @param callbackContext The context under which the callback will be applied. If not specified it will use the callback itself as the context. + * @return This Loader instance. */ binary(key: string, url: string, callback?: Function, callbackContext?: Function): Phaser.Loader; /** * Add a new bitmap font loading request. * - * @param key - Unique asset key of the bitmap font. - * @param textureURL - The url of the font image file. - * @param xmlURL - The url of the font data file (xml/fnt) - * @param xmlData - An optional XML data object. - * @param xSpacing - If you'd like to add additional horizontal spacing between the characters then set the pixel value here. - Default: 0 - * @param ySpacing - If you'd like to add additional vertical spacing between the lines then set the pixel value here. - Default: 0 - * @return - This Loader instance. + * @param key Unique asset key of the bitmap font. + * @param textureURL The url of the font image file. + * @param xmlURL The url of the font data file (xml/fnt) + * @param xmlData An optional XML data object. + * @param xSpacing If you'd like to add additional horizontal spacing between the characters then set the pixel value here. - Default: 0 + * @param ySpacing If you'd like to add additional vertical spacing between the lines then set the pixel value here. - Default: 0 + * @return This Loader instance. */ bitmapFont(key: string, textureURL: string, xmlURL?: string, xmlData?: any, xSpacing?: number, ySpacing?: number): Phaser.Loader; @@ -9734,93 +9734,93 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Check whether asset exists with a specific key. * Use Phaser.Cache to access loaded assets, e.g. Phaser.Cache#checkImageKey * - * @param type - The type asset you want to check. - * @param key - Key of the asset you want to check. - * @return - Return true if exists, otherwise return false. + * @param type The type asset you want to check. + * @param key Key of the asset you want to check. + * @return Return true if exists, otherwise return false. */ checkKeyExists(type: string, key: string): boolean; /** * Successfully loaded a CSV file. * - * @param index - The index of the file in the file queue that loaded. + * @param index The index of the file in the file queue that loaded. */ csvLoadComplete(index: number): void; /** * Error occured when load a JSON. * - * @param index - The index of the file in the file queue that errored. + * @param index The index of the file in the file queue that errored. */ dataLoadError(index: number): void; /** * Called when a file is successfully loaded. * - * @param index - The index of the file in the file queue that loaded. + * @param index The index of the file in the file queue that loaded. */ fileComplete(index: number): void; /** * Error occured when loading a file. * - * @param index - The index of the file in the file queue that errored. + * @param index The index of the file in the file queue that errored. */ fileError(index: number): void; /** * Gets the asset that is queued for load. * - * @param type - The type asset you want to check. - * @param key - Key of the asset you want to check. - * @return - Returns an object if found that has 2 properties: index and file. Otherwise false. + * @param type The type asset you want to check. + * @param key Key of the asset you want to check. + * @return Returns an object if found that has 2 properties: index and file. Otherwise false. */ getAsset(type: string, key: string): any; /** * Gets the fileList index for the given key. * - * @param type - The type asset you want to check. - * @param key - Key of the asset you want to check. - * @return - The index of this key in the filelist, or -1 if not found. + * @param type The type asset you want to check. + * @param key Key of the asset you want to check. + * @return The index of this key in the filelist, or -1 if not found. */ getAssetIndex(type: string, key: string): number; /** * Add an image to the Loader. * - * @param key - Unique asset key of this image file. - * @param url - URL of image file. - * @param overwrite - If an unloaded file with a matching key already exists in the queue, this entry will overwrite it. - Default: false - * @return - This Loader instance. + * @param key Unique asset key of this image file. + * @param url URL of image file. + * @param overwrite If an unloaded file with a matching key already exists in the queue, this entry will overwrite it. - Default: false + * @return This Loader instance. */ image(key: string, url: string, overwrite?: boolean): Phaser.Loader; /** * Add a json file to the Loader. * - * @param key - Unique asset key of the json file. - * @param url - URL of the json file. - * @param overwrite - If an unloaded file with a matching key already exists in the queue, this entry will overwrite it. - Default: false - * @return - This Loader instance. + * @param key Unique asset key of the json file. + * @param url URL of the json file. + * @param overwrite If an unloaded file with a matching key already exists in the queue, this entry will overwrite it. - Default: false + * @return This Loader instance. */ json(key: string, url: string, overwrite?: boolean): Phaser.Loader; /** * Successfully loaded a JSON file. * - * @param index - The index of the file in the file queue that loaded. + * @param index The index of the file in the file queue that loaded. */ jsonLoadComplete(index: number): void; /** * Add an image to the Loader. * - * @param key - Unique asset key of this image file. - * @param url - URL of the Asset Pack JSON file. If you wish to pass a json object instead set this to null and pass the object as the data parameter. - * @param data - The Asset Pack JSON data. Use this to pass in a json data object rather than loading it from a URL. TODO - * @param callbackContext - Some Loader operations, like Binary and Script require a context for their callbacks. Pass the context here. - * @return - This Loader instance. + * @param key Unique asset key of this image file. + * @param url URL of the Asset Pack JSON file. If you wish to pass a json object instead set this to null and pass the object as the data parameter. + * @param data The Asset Pack JSON data. Use this to pass in a json data object rather than loading it from a URL. TODO + * @param callbackContext Some Loader operations, like Binary and Script require a context for their callbacks. Pass the context here. + * @return This Loader instance. */ pack(key: string, url?: string, data?: any, callbackContext?: any): Phaser.Loader; @@ -9828,11 +9828,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Add a new physics data object loading request. * The data must be in Lime + Corona JSON format. Physics Editor by code'n'web exports in this format natively. * - * @param key - Unique asset key of the physics json data. - * @param url - The url of the map data file (csv/json) - * @param data - An optional JSON data object. If given then the url is ignored and this JSON object is used for physics data instead. - * @param format - The format of the physics data. - Default: Phaser.Physics.LIME_CORONA_JSON - * @return - This Loader instance. + * @param key Unique asset key of the physics json data. + * @param url The url of the map data file (csv/json) + * @param data An optional JSON data object. If given then the url is ignored and this JSON object is used for physics data instead. + * @param format The format of the physics data. - Default: Phaser.Physics.LIME_CORONA_JSON + * @return This Loader instance. */ physics(key: string, url?: string, data?: any, format?: string): Phaser.Loader; @@ -9844,18 +9844,18 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Remove loading request of a file. * - * @param type - The type of resource to add to the list (image, audio, xml, etc). - * @param key - Key of the file you want to remove. + * @param type The type of resource to add to the list (image, audio, xml, etc). + * @param key Key of the file you want to remove. */ removeFile(key: string, type: string): void; /** * Internal function that replaces an existing entry in the file list with a new one. Do not call directly. * - * @param type - The type of resource to add to the list (image, audio, xml, etc). - * @param key - The unique Cache ID key of this resource. - * @param url - The URL the asset will be loaded from. - * @param properties - Any additional properties needed to load the file. + * @param type The type of resource to add to the list (image, audio, xml, etc). + * @param key The unique Cache ID key of this resource. + * @param url The URL the asset will be loaded from. + * @param properties Any additional properties needed to load the file. */ replaceInFileList(type: string, key: string, url: string, properties: any): void; @@ -9868,8 +9868,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Called automatically by ScaleManager when the game resizes in RESIZE scalemode. * We use this to adjust the height of the preloading sprite, if set. * - * @param width - The new width of the game in pixels. - * @param height - The new height of the game in pixels. + * @param width The new width of the game in pixels. + * @param height The new height of the game in pixels. */ resize(): void; @@ -9877,11 +9877,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Add a JavaScript file to the Loader. Once loaded the JavaScript file will be automatically turned into a script tag (and executed), so be careful what you load! * You can also specify a callback. This will be executed as soon as the script tag has been created. * - * @param key - Unique asset key of the script file. - * @param url - URL of the JavaScript file. - * @param callback - Optional callback that will be called after the script tag has loaded, so you can perform additional processing. - * @param callbackContext - The context under which the callback will be applied. If not specified it will use the callback itself as the context. - * @return - This Loader instance. + * @param key Unique asset key of the script file. + * @param url URL of the JavaScript file. + * @param callback Optional callback that will be called after the script tag has loaded, so you can perform additional processing. + * @param callbackContext The context under which the callback will be applied. If not specified it will use the callback itself as the context. + * @return This Loader instance. */ script(key: string, url: String, callback?: Function, callbackContext?: any): Phaser.Loader; @@ -9890,22 +9890,22 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * A "preload" sprite will have its width or height crop adjusted based on the percentage of the loader in real-time. * This allows you to easily make loading bars for games. Note that Sprite.visible = true will be set when calling this. * - * @param sprite - The sprite or image that will be cropped during the load. - * @param direction - A value of zero means the sprite will be cropped horizontally, a value of 1 means its will be cropped vertically. - Default: 0 + * @param sprite The sprite or image that will be cropped during the load. + * @param direction A value of zero means the sprite will be cropped horizontally, a value of 1 means its will be cropped vertically. - Default: 0 */ setPreloadSprite(sprite: Phaser.Sprite, direction?: number): void; /** * Add a new sprite sheet to the loader. * - * @param key - Unique asset key of the sheet file. - * @param url - URL of the sheet file. - * @param frameWidth - Width of each single frame. - * @param frameHeight - Height of each single frame. - * @param frameMax - How many frames in this sprite sheet. If not specified it will divide the whole image into frames. - Default: -1 - * @param margin - If the frames have been drawn with a margin, specify the amount here. - Default: 0 - * @param spacing - If the frames have been drawn with spacing between them, specify the amount here. - Default: 0 - * @return - This Loader instance. + * @param key Unique asset key of the sheet file. + * @param url URL of the sheet file. + * @param frameWidth Width of each single frame. + * @param frameHeight Height of each single frame. + * @param frameMax How many frames in this sprite sheet. If not specified it will divide the whole image into frames. - Default: -1 + * @param margin If the frames have been drawn with a margin, specify the amount here. - Default: 0 + * @param spacing If the frames have been drawn with spacing between them, specify the amount here. - Default: 0 + * @return This Loader instance. */ spritesheet(key: string, url: string, frameWidth: number, frameHeight: number, frameMax?: number, margin?: number, spacing?: number): Phaser.Loader; @@ -9917,62 +9917,62 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Add a text file to the Loader. * - * @param key - Unique asset key of the text file. - * @param url - URL of the text file. - * @param overwrite - If an unloaded file with a matching key already exists in the queue, this entry will overwrite it. - Default: false - * @return - This Loader instance. + * @param key Unique asset key of the text file. + * @param url URL of the text file. + * @param overwrite If an unloaded file with a matching key already exists in the queue, this entry will overwrite it. - Default: false + * @return This Loader instance. */ text(key: string, url: string, overwrite?: boolean): Phaser.Loader; /** * Add a new tilemap loading request. * - * @param key - Unique asset key of the tilemap data. - * @param url - The url of the map data file (csv/json) - * @param data - An optional JSON data object. If given then the url is ignored and this JSON object is used for map data instead. - * @param format - The format of the map data. Either Phaser.Tilemap.CSV or Phaser.Tilemap.TILED_JSON. - Default: Phaser.Tilemap.CSV - * @return - This Loader instance. + * @param key Unique asset key of the tilemap data. + * @param url The url of the map data file (csv/json) + * @param data An optional JSON data object. If given then the url is ignored and this JSON object is used for map data instead. + * @param format The format of the map data. Either Phaser.Tilemap.CSV or Phaser.Tilemap.TILED_JSON. - Default: Phaser.Tilemap.CSV + * @return This Loader instance. */ tilemap(key: string, url?: string, data?: any, format?: number): Phaser.Loader; /** * Returns the number of files that have already been loaded, even if they errored. - * @return - The number of files that have already been loaded (even if they errored) + * @return The number of files that have already been loaded (even if they errored) */ totalLoadedFiles(): number; /** * Returns the number of asset packs that have already been loaded, even if they errored. - * @return - The number of asset packs that have already been loaded (even if they errored) + * @return The number of asset packs that have already been loaded (even if they errored) */ totalLoadedPacks(): number; /** * Returns the number of files still waiting to be processed in the load queue. This value decreases as each file in the queue is loaded. - * @return - The number of files that still remain in the load queue. + * @return The number of files that still remain in the load queue. */ totalQueuedFiles(): number; /** * Returns the number of asset packs still waiting to be processed in the load queue. This value decreases as each pack in the queue is loaded. - * @return - The number of asset packs that still remain in the load queue. + * @return The number of asset packs that still remain in the load queue. */ totalQueuedPacks(): number; /** * Add an XML file to the Loader. * - * @param key - Unique asset key of the xml file. - * @param url - URL of the xml file. - * @param overwrite - If an unloaded file with a matching key already exists in the queue, this entry will overwrite it. - Default: false - * @return - This Loader instance. + * @param key Unique asset key of the xml file. + * @param url URL of the xml file. + * @param overwrite If an unloaded file with a matching key already exists in the queue, this entry will overwrite it. - Default: false + * @return This Loader instance. */ xml(key: string, url: string, overwrite?: boolean): Phaser.Loader; /** * Successfully loaded an XML file. * - * @param index - The index of the file in the file queue that loaded. + * @param index The index of the file in the file queue that loaded. */ xmlLoadComplete(index: number): void; @@ -9988,11 +9988,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Parse a Bitmap Font from an XML file. * - * @param game - A reference to the current game. - * @param xml - XML data you want to parse. - * @param cacheKey - The key of the texture this font uses in the cache. - * @param xSpacing - Additional horizontal spacing between the characters. - Default: 0 - * @param ySpacing - Additional vertical spacing between the characters. - Default: 0 + * @param game A reference to the current game. + * @param xml XML data you want to parse. + * @param cacheKey The key of the texture this font uses in the cache. + * @param xSpacing Additional horizontal spacing between the characters. - Default: 0 + * @param ySpacing Additional vertical spacing between the characters. - Default: 0 */ static bitmapFont(game: Phaser.Game, xml: any, cacheKey: string, xSpacing: number, ySpacing: number): Phaser.FrameData; @@ -10010,20 +10010,20 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Find the angle of a segment from (x1, y1) -> (x2, y2). * - * @param x1 - - * @param y1 - - * @param x2 - - * @param y2 - - * @return - The angle, in radians. + * @param x1 + * @param y1 + * @param x2 + * @param y2 + * @return The angle, in radians. */ static angleBetween(x1: number, y1: number, x2: number, y2: number): number; /** * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y). * - * @param point1 - - * @param point2 - - * @return - The angle, in radians. + * @param point1 + * @param point2 + * @return The angle, in radians. */ static angleBetweenPoints(point1: Phaser.Point, point2: Phaser.Point): number; @@ -10032,75 +10032,75 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Note that the difference between this method and Math.angleBetween is that this assumes the y coordinate travels * down the screen. * - * @param x1 - - * @param y1 - - * @param x2 - - * @param y2 - - * @return - The angle, in radians. + * @param x1 + * @param y1 + * @param x2 + * @param y2 + * @return The angle, in radians. */ static angleBetweenY(x1: number, y1: number, x2: number, y2: number): number; /** * Find the angle of a segment from (point1.x, point1.y) -> (point2.x, point2.y). * - * @param point1 - - * @param point2 - - * @return - The angle, in radians. + * @param point1 + * @param point2 + * @return The angle, in radians. */ static angleBetweenPointsY(point1: Phaser.Point, point2: Phaser.Point): number; /** * Keeps an angle value between the given min and max values. * - * @param angle - The angle value to check. Must be between -180 and +180. - * @param min - The minimum angle that is allowed (must be -180 or greater). - * @param max - The maximum angle that is allowed (must be 180 or less). - * @return - The new angle value, returns the same as the input angle if it was within bounds + * @param angle The angle value to check. Must be between -180 and +180. + * @param min The minimum angle that is allowed (must be -180 or greater). + * @param max The maximum angle that is allowed (must be 180 or less). + * @return The new angle value, returns the same as the input angle if it was within bounds */ static angleLimit(angle: number, min: number, max: number): number; /** * Averages all values passed to the function and returns the result. - * @return - The average of all given values. + * @return The average of all given values. */ static average(...numbers: number[]): number; /** * * - * @param n - - * @param i - - * @return - + * @param n + * @param i + * @return */ static bernstein(n: number, i: number): number; /** * A Bezier Interpolation Method, mostly used by Phaser.Tween. * - * @param v - - * @param k - - * @return - + * @param v + * @param k + * @return */ static bezierInterpolation(v: number[], k: number): number; /** * Calculates a callmum rom value. * - * @param p0 - - * @param p1 - - * @param p2 - - * @param p3 - - * @param t - - * @return - + * @param p0 + * @param p1 + * @param p2 + * @param p3 + * @param t + * @return */ static catmullRom(p0: number, p1: number, p2: number, p3: number, t: number): number; /** * A Catmull Rom Interpolation Method, mostly used by Phaser.Tween. * - * @param v - - * @param k - - * @return - + * @param v + * @param k + * @return */ static catmullRomInterpolation(v: number[], k: number): number; @@ -10111,18 +10111,18 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * E.g. `ceil(1.3) == 2`, and `ceil(-2.3) == -3`. * - * @param value - Any number. - * @return - The rounded value of that number. + * @param value Any number. + * @return The rounded value of that number. */ static ceil(value: number): number; /** * * - * @param value - The value to round. - * @param place - The place to round to. - * @param base - The base to round in... default is 10 for decimal. - * @return - + * @param value The value to round. + * @param place The place to round to. + * @param base The base to round in... default is 10 for decimal. + * @return */ static ceilTo(value: number, place?: number, base?: number): number; @@ -10132,18 +10132,18 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Returns true or false based on the chance value (default 50%). For example if you wanted a player to have a 30% chance * of getting a bonus, call chanceRoll(30) - true means the chance passed, false means it failed. * - * @param chance - The chance of receiving the value. A number between 0 and 100 (effectively 0% to 100%). - * @return - True if the roll passed, or false otherwise. + * @param chance The chance of receiving the value. A number between 0 and 100 (effectively 0% to 100%). + * @return True if the roll passed, or false otherwise. */ static chanceRoll(chance: number): boolean; /** * Force a value within the boundaries by clamping `x` to the range `[a, b]`. * - * @param x - - * @param a - - * @param b - - * @return - + * @param x + * @param a + * @param b + * @return */ static clamp(x: number, a: number, b: number): number; @@ -10151,68 +10151,68 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Clamp `x` to the range `[a, Infinity)`. * Roughly the same as `Math.max(x, a)`, except for NaN handling. * - * @param x - - * @param a - - * @return - + * @param x + * @param a + * @return */ static clampBottom(x: number, a: number): number; /** * Convert degrees to radians. * - * @param degrees - Angle in degrees. - * @return - Angle in radians. + * @param degrees Angle in degrees. + * @return Angle in radians. */ static degToRad(degrees: number): number; /** * The (absolute) difference between two values. * - * @param a - - * @param b - - * @return - + * @param a + * @param b + * @return */ static difference(a: number, b: number): number; /** * Returns the euclidian distance between the two given set of coordinates. * - * @param x1 - - * @param y1 - - * @param x2 - - * @param y2 - - * @return - The distance between the two sets of coordinates. + * @param x1 + * @param y1 + * @param x2 + * @param y2 + * @return The distance between the two sets of coordinates. */ static distance(x1: number, y1: number, x2: number, y2: number): number; /** * Returns the distance between the two given set of coordinates at the power given. * - * @param x1 - - * @param y1 - - * @param x2 - - * @param y2 - - * @param pow - - Default: 2 - * @return - The distance between the two sets of coordinates. + * @param x1 + * @param y1 + * @param x2 + * @param y2 + * @param pow - Default: 2 + * @return The distance between the two sets of coordinates. */ static distancePow(xy: number, y1: number, x2: number, y2: number, pow?: number): number; /** * Returns the rounded distance between the two given set of coordinates. * - * @param x1 - - * @param y1 - - * @param x2 - - * @param y2 - - * @return - The distance between this Point object and the destination Point object. + * @param x1 + * @param y1 + * @param x2 + * @param y2 + * @return The distance between this Point object and the destination Point object. */ static distanceRounded(x1: number, y1: number, x2: number, y2: number): number; /** * * - * @param value - the number you want to evaluate - * @return - + * @param value the number you want to evaluate + * @return */ static factorial(value: number): number; @@ -10223,76 +10223,76 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * E.g. `floor(1.7) == 1`, and `floor(-2.7) == -2`. * - * @param value - Any number. - * @return - The rounded value of that number. + * @param value Any number. + * @return The rounded value of that number. */ static floor(value: number): number; /** * * - * @param value - The value to round. - * @param place - The place to round to. - * @param base - The base to round in... default is 10 for decimal. - * @return - + * @param value The value to round. + * @param place The place to round to. + * @param base The base to round in... default is 10 for decimal. + * @return */ static floorTo(value: number, place: number, base: number): number; /** * * - * @param val - - * @param epsilon - - Default: (small value) - * @return - ceiling(val-epsilon) + * @param val + * @param epsilon - Default: (small value) + * @return ceiling(val-epsilon) */ static fuzzyCeil(val: number, epsilon?: number): boolean; /** * Two number are fuzzyEqual if their difference is less than epsilon. * - * @param a - - * @param b - - * @param epsilon - - Default: (small value) - * @return - True if |a-b|b+epsilon + * @param a + * @param b + * @param epsilon - Default: (small value) + * @return True if a>b+epsilon */ static fuzzyGreaterThan(a: number, b: number, epsilon?: number): boolean; /** * `a` is fuzzyLessThan `b` if it is less than b + epsilon. * - * @param a - - * @param b - - * @param epsilon - - Default: (small value) - * @return - True if a(objects: T[], startIndex?: number, length?: number): T; /** * A one dimensional linear interpolation of a value. * - * @param a - - * @param b - - * @param weight - - * @return - + * @param a + * @param b + * @param weight + * @return */ static interpolateFloat(a: number, b: number, weight: number): number; /** * Returns true if the number given is even. * - * @param n - The number to check. - * @return - True if the given number is even. False if the given number is odd. + * @param n The number to check. + * @return True if the given number is even. False if the given number is odd. */ static isEven(n: number): boolean; /** * Returns true if the number given is odd. * - * @param n - The number to check. - * @return - True if the given number is odd. False if the given number is even. + * @param n The number to check. + * @return True if the given number is odd. False if the given number is even. */ static isOdd(n: number): boolean; /** * Calculates a linear (interpolation) value over t. * - * @param p0 - - * @param p1 - - * @param t - - * @return - + * @param p0 + * @param p1 + * @param t + * @return */ static linear(p0: number, p1: number, t: number): number; /** * A Linear Interpolation Method, mostly used by Phaser.Tween. * - * @param v - - * @param k - - * @return - + * @param v + * @param k + * @return */ static linearInterpolation(v: number[], k: number): number; /** * Ensures the given value is between min and max inclusive. * - * @param value - The value to limit. - * @param min - The minimum the value can be. - * @param max - The maximum the value can be. - * @return - The limited value. + * @param value The value to limit. + * @param min The minimum the value can be. + * @param max The maximum the value can be. + * @return The limited value. */ static limitValue(value: number, min: number, max: number): number; /** * Linear mapping from range to range * - * @param x - the value to map - * @param a1 - first endpoint of the range - * @param a2 - final endpoint of the range - * @param b1 - first endpoint of the range - * @param b2 - final endpoint of the range - * @return - + * @param x the value to map + * @param a1 first endpoint of the range + * @param a2 final endpoint of the range + * @param b1 first endpoint of the range + * @param b2 final endpoint of the range + * @return */ static mapLinear(x: number, a1: number, a2: number, b1: number, b2: number): number; @@ -10380,24 +10380,24 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Variation of Math.max that can be passed either an array of numbers or the numbers as parameters. * * Prefer the standard `Math.max` function when appropriate. - * @return - The largest value from those given. + * @return The largest value from those given. */ static max(...numbers: number[]): number; /** * Adds the given amount to the value, but never lets the value go over the specified maximum. * - * @param value - The value to add the amount to. - * @param amount - The amount to add to the value. - * @param max - The maximum the value is allowed to be. - * @return - + * @param value The value to add the amount to. + * @param amount The amount to add to the value. + * @param max The maximum the value is allowed to be. + * @return */ static maxAdd(value: number, amount: number, max: number): number; /** * Variation of Math.max that can be passed a property and either an array of objects or the objects as parameters. * It will find the largest matching property value from the given objects. - * @return - The largest value from those given. + * @return The largest value from those given. */ static maxProperty(...numbers: number[]): number; @@ -10405,57 +10405,57 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Variation of Math.min that can be passed either an array of numbers or the numbers as parameters. * * Prefer the standard `Math.min` function when appropriate. - * @return - The lowest value from those given. + * @return The lowest value from those given. */ static min(...numbers: number[]): number; /** * Variation of Math.min that can be passed a property and either an array of objects or the objects as parameters. * It will find the lowest matching property value from the given objects. - * @return - The lowest value from those given. + * @return The lowest value from those given. */ static minProperty(...numbers: number[]): number; /** * Subtracts the given amount from the value, but never lets the value go below the specified minimum. * - * @param value - The base value. - * @param amount - The amount to subtract from the base value. - * @param min - The minimum the value is allowed to be. - * @return - The new value. + * @param value The base value. + * @param amount The amount to subtract from the base value. + * @param min The minimum the value is allowed to be. + * @return The new value. */ static minSub(value: number, amount: number, min: number): number; /** * Normalizes an angle to the [0,2pi) range. * - * @param angleRad - The angle to normalize, in radians. - * @return - Returns the angle, fit within the [0,2pi] range, in radians. + * @param angleRad The angle to normalize, in radians. + * @return Returns the angle, fit within the [0,2pi] range, in radians. */ static normalizeAngle(angle: number, radians?: boolean): number; /** * Normalizes a latitude to the [-90,90] range. Latitudes above 90 or below -90 are capped, not wrapped. * - * @param lat - The latitude to normalize, in degrees. - * @return - Returns the latitude, fit within the [-90,90] range. + * @param lat The latitude to normalize, in degrees. + * @return Returns the latitude, fit within the [-90,90] range. */ static normalizeLatitude(lat: number): number; /** * Normalizes a longitude to the [-180,180] range. Longitudes above 180 or below -180 are wrapped. * - * @param lng - The longitude to normalize, in degrees. - * @return - Returns the longitude, fit within the [-180,180] range. + * @param lng The longitude to normalize, in degrees. + * @return Returns the longitude, fit within the [-180,180] range. */ static normalizeLongitude(lng: number): number; /** * Create an array representing the inclusive range of numbers (usually integers) in `[start, end]`. * - * @param start - The minimum value the array starts with. - * @param end - The maximum value the array contains. - * @return - The array of number values. + * @param start The minimum value the array starts with. + * @param end The maximum value the array contains. + * @return The array of number values. */ static numberArray(start: number, end: number): number[]; @@ -10468,20 +10468,20 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Certain values for `start` and `end` (eg. NaN/undefined/null) are coerced to 0; * for forward compatibility make sure to pass in actual numbers. * - * @param start - The start of the range. - * @param end - The end of the range. - * @param step - The value to increment or decrement by. - Default: 1 - * @return - Returns the new array of numbers. + * @param start The start of the range. + * @param end The end of the range. + * @param step The value to increment or decrement by. - Default: 1 + * @return Returns the new array of numbers. */ static numberArrayStep(start: number, end: number, step?: number): number[]; /** * Work out what percentage value `a` is of value `b` using the given base. * - * @param a - The value to work out the percentage for. - * @param b - The value you wish to get the percentage of. - * @param base - The base value. - Default: 0 - * @return - The percentage a is of b, between 0 and 1. + * @param a The value to work out the percentage for. + * @param b The value you wish to get the percentage of. + * @param base The base value. - Default: 0 + * @return The percentage a is of b, between 0 and 1. */ static percent(a: number, b: number, base?: number): number; static p2px(v: number): number; @@ -10495,22 +10495,22 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Convert degrees to radians. * - * @param radians - Angle in radians. - * @return - Angle in degrees + * @param radians Angle in radians. + * @return Angle in degrees */ static radToDeg(radians: number): number; /** * Randomly returns either a 1 or -1. - * @return - Either 1 or -1 + * @return Either 1 or -1 */ static randomSign(): number; /** * Reverses an angle. * - * @param angleRad - The angle to reverse, in radians. - * @return - Returns the reverse angle, in radians. + * @param angleRad The angle to reverse, in radians. + * @return Returns the reverse angle, in radians. */ static reverseAngle(angleRed: number): number; @@ -10520,10 +10520,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Will return null if there are no array items that fall within the specified range * or if there is no item for the randomly choosen index. * - * @param objects - An array of objects. - * @param startIndex - Optional offset off the front of the array. Default value is 0, or the beginning of the array. - * @param length - Optional restriction on the number of values you want to randomly select from. - * @return - The random object that was removed. + * @param objects An array of objects. + * @param startIndex Optional offset off the front of the array. Default value is 0, or the beginning of the array. + * @param length Optional restriction on the number of values you want to randomly select from. + * @return The random object that was removed. */ static removeRandom(objects: T[], startIndex?: number, length?: number): T; @@ -10556,34 +10556,34 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Note what occurs when we round to the 3rd space (8ths place), 100100000, this is to be assumed * because we are rounding 100011.1011011011011011 which rounds up. * - * @param value - The value to round. - * @param place - The place to round to. - * @param base - The base to round in... default is 10 for decimal. - * @return - + * @param value The value to round. + * @param place The place to round to. + * @param base The base to round in... default is 10 for decimal. + * @return */ static roundTo(value: number, place?: number, base?: number): number; /** * * - * @param n - - * @return - n mod 1 + * @param n + * @return n mod 1 */ static shear(n: number): number; /** * Moves the element from the start of the array to the end, shifting all items in the process. * - * @param array - The array to shift/rotate. The array is modified. - * @return - The shifted value. + * @param array The array to shift/rotate. The array is modified. + * @return The shifted value. */ static shift(stack: any[]): any; /** * Shuffles the data in the given array into a new order. * - * @param array - The array to shuffle - * @return - The array + * @param array The array to shuffle + * @return The array */ static shuffleArray(array: any[]): any[]; @@ -10592,8 +10592,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * This works differently from `Math.sign` for values of NaN and -0, etc. * - * @param x - - * @return - An integer in {-1, 0, 1} + * @param x + * @return An integer in {-1, 0, 1} */ static sign(x: number): number; @@ -10603,31 +10603,31 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The parameters allow you to specify the length, amplitude and frequency of the wave. Once you have called this function * you should get the results via getSinTable() and getCosTable(). This generator is fast enough to be used in real-time. * - * @param length - The length of the wave - * @param sinAmplitude - The amplitude to apply to the sine table (default 1.0) if you need values between say -+ 125 then give 125 as the value - * @param cosAmplitude - The amplitude to apply to the cosine table (default 1.0) if you need values between say -+ 125 then give 125 as the value - * @param frequency - The frequency of the sine and cosine table data - * @return - Returns the table data. + * @param length The length of the wave + * @param sinAmplitude The amplitude to apply to the sine table (default 1.0) if you need values between say -+ 125 then give 125 as the value + * @param cosAmplitude The amplitude to apply to the cosine table (default 1.0) if you need values between say -+ 125 then give 125 as the value + * @param frequency The frequency of the sine and cosine table data + * @return Returns the table data. */ static sinCosGenerator(length: number, sinAmplitude?: number, cosAmplitude?: number, frequency?: number): { sin: number[]; cos: number[]; }; /** * Smootherstep function as detailed at http://en.wikipedia.org/wiki/Smoothstep * - * @param x - - * @param min - - * @param max - - * @return - + * @param x + * @param min + * @param max + * @return */ static smootherstep(x: number, min: number, max: number): number; /** * Smoothstep function as detailed at http://en.wikipedia.org/wiki/Smoothstep * - * @param x - - * @param min - - * @param max - - * @return - + * @param x + * @param min + * @param max + * @return */ static smoothstep(x: number, min: number, max: number): number; @@ -10636,10 +10636,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Example: if you have an interval gap of 5 and a position of 12... you will snap to 10 whereas 14 will snap to 15. * - * @param input - The value to snap. - * @param gap - The interval gap of the grid. - * @param start - Optional starting offset for gap. - * @return - + * @param input The value to snap. + * @param gap The interval gap of the grid. + * @param start Optional starting offset for gap. + * @return */ static snapTo(input: number, gap: number, start?: number): number; @@ -10648,10 +10648,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Example: if you have an interval gap of 5 and a position of 12... you will snap to 15. As will 14 will snap to 15... but 16 will snap to 20. * - * @param input - The value to snap. - * @param gap - The interval gap of the grid. - * @param start - Optional starting offset for gap. - * @return - + * @param input The value to snap. + * @param gap The interval gap of the grid. + * @param start Optional starting offset for gap. + * @return */ static snapToCeil(input: number, gap: number, start?: number): number; @@ -10660,38 +10660,38 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Example: if you have an interval gap of 5 and a position of 12... you will snap to 10. As will 14 snap to 10... but 16 will snap to 15 * - * @param input - The value to snap. - * @param gap - The interval gap of the grid. - * @param start - Optional starting offset for gap. - * @return - + * @param input The value to snap. + * @param gap The interval gap of the grid. + * @param start Optional starting offset for gap. + * @return */ static snapToFloor(input: number, gap: number, start?: number): number; /** * Snaps a value to the nearest value in an array. * - * @param input - - * @param arr - - * @param sort - True if the array needs to be sorted. - * @return - + * @param input + * @param arr + * @param sort True if the array needs to be sorted. + * @return */ static snapToInArray(input: number, arr: number[], sort?: boolean): number; /** * * - * @param n - - * @return - + * @param n + * @return */ static truncate(n: number): number; /** * Checks if two values are within the given tolerance of each other. * - * @param a - The first number to check - * @param b - The second number to check - * @param tolerance - The tolerance. Anything equal to or less than this is considered within the range. - * @return - True if a is <= tolerance of b. + * @param a The first number to check + * @param b The second number to check + * @param tolerance The tolerance. Anything equal to or less than this is considered within the range. + * @return True if a is <= tolerance of b. */ static within(a: number, b: number, tolerance: number): boolean; @@ -10700,19 +10700,19 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * If `max` is not larger than `min` the result is 0. * - * @param value - The value to wrap. - * @param min - The minimum the value is allowed to be. - * @param max - The maximum the value is allowed to be, should be larger than `min`. - * @return - The wrapped value. + * @param value The value to wrap. + * @param min The minimum the value is allowed to be. + * @param max The maximum the value is allowed to be, should be larger than `min`. + * @return The wrapped value. */ static wrap(value: number, min: number, max: number): number; /** * Keeps an angle value between -180 and +180; or -PI and PI if radians. * - * @param angle - The angle value to wrap - * @param radians - Set to `true` if the angle is given in radians, otherwise degrees is expected. - Default: false - * @return - The new angle value; will be the same as the input angle if it was within bounds. + * @param angle The angle value to wrap + * @param radians Set to `true` if the angle is given in radians, otherwise degrees is expected. - Default: false + * @return The new angle value; will be the same as the input angle if it was within bounds. */ static wrapAngle(angle: number, radians?: boolean): number; @@ -10721,10 +10721,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Values _must_ be positive integers, and are passed through Math.abs. See {@link Phaser.Math#wrap} for an alternative. * - * @param value - The value to add the amount to. - * @param amount - The amount to add to the value. - * @param max - The maximum the value is allowed to be. - * @return - The wrapped value. + * @param value The value to add the amount to. + * @param amount The amount to add to the value. + * @param max The maximum the value is allowed to be. + * @return The wrapped value. */ static wrapValue(value: number, amount: number, max: number): number; @@ -10758,7 +10758,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * It captures and processes mouse events that happen on the game canvas object. It also adds a single `mouseup` listener to `window` which * is used to capture the mouse being released when not over the game. * - * @param game - A reference to the currently running game. + * @param game A reference to the currently running game. */ constructor(game: Phaser.Game); @@ -10895,56 +10895,56 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * The internal method that handles the mouse down event from the browser. * - * @param event - The native event from the browser. This gets stored in Mouse.event. + * @param event The native event from the browser. This gets stored in Mouse.event. */ onMouseDown(event: MouseEvent): void; /** * The internal method that handles the mouse move event from the browser. * - * @param event - The native event from the browser. This gets stored in Mouse.event. + * @param event The native event from the browser. This gets stored in Mouse.event. */ onMouseMove(event: MouseEvent): void; /** * The internal method that handles the mouse out event from the browser. * - * @param event - The native event from the browser. This gets stored in Mouse.event. + * @param event The native event from the browser. This gets stored in Mouse.event. */ onMouseOut(event: MouseEvent): void; /** * The internal method that handles the mouse over event from the browser. * - * @param event - The native event from the browser. This gets stored in Mouse.event. + * @param event The native event from the browser. This gets stored in Mouse.event. */ onMouseOver(event: MouseEvent): void; /** * The internal method that handles the mouse up event from the browser. * - * @param event - The native event from the browser. This gets stored in Mouse.event. + * @param event The native event from the browser. This gets stored in Mouse.event. */ onMouseUp(event: MouseEvent): void; /** * The internal method that handles the mouse up event from the window. * - * @param event - The native event from the browser. This gets stored in Mouse.event. + * @param event The native event from the browser. This gets stored in Mouse.event. */ onMouseUpGlobal(event: MouseEvent): void; /** * The internal method that handles the mouse wheel event from the browser. * - * @param event - The native event from the browser. + * @param event The native event from the browser. */ onMouseWheel(event: MouseEvent): void; /** * Internal pointerLockChange handler. * - * @param event - The native event from the browser. This gets stored in Mouse.event. + * @param event The native event from the browser. This gets stored in Mouse.event. */ pointerLockChange(event: MouseEvent): void; @@ -10988,7 +10988,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * It will work only in Internet Explorer 10 and Windows Store or Windows Phone 8 apps using JavaScript. * http://msdn.microsoft.com/en-us/library/ie/hh673557(v=vs.85).aspx * - * @param game - A reference to the currently running game. + * @param game A reference to the currently running game. */ constructor(game: Phaser.Game); @@ -11008,21 +11008,21 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * The function that handles the PointerDown event. * - * @param event - The native DOM event. + * @param event The native DOM event. */ onPointerDown(event: MSPointerEvent): void; /** * The function that handles the PointerMove event. * - * @param event - The native DOM event. + * @param event The native DOM event. */ onPointerMove(event: MSPointerEvent): void; /** * The function that handles the PointerUp event. * - * @param event - The native DOM event. + * @param event The native DOM event. */ onPointerUp(event: MSPointerEvent): void; mouseDownCallback(event: MSPointerEvent): void; @@ -11051,7 +11051,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Phaser.Net handles browser URL related tasks such as checking host names, domain names and query string manipulation. * - * @param game - A reference to the currently running game. + * @param game A reference to the currently running game. */ constructor(game: Phaser.Game); @@ -11064,8 +11064,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * You can specify a part of a domain, for example 'google' would match 'google.com', 'google.co.uk', etc. * Do not include 'http://' at the start. * - * @param domain - - * @return - true if the given domain fragment can be found in the window.location.hostname + * @param domain + * @return true if the given domain fragment can be found in the window.location.hostname */ checkDomainName(domain: string): boolean; @@ -11073,14 +11073,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Returns the Query String as an object. * If you specify a parameter it will return just the value of that parameter, should it exist. * - * @param value - The URI component to be decoded. - * @return - The decoded value. + * @param value The URI component to be decoded. + * @return The decoded value. */ decodeURI(value: string): string; /** * Returns the hostname given by the browser. - * @return - + * @return */ getHostName(): string; @@ -11088,8 +11088,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Returns the Query String as an object. * If you specify a parameter it will return just the value of that parameter, should it exist. * - * @param parameter - If specified this will return just the value for that key. - Default: '' - * @return - An object containing the key value pairs found in the query string or just the value if a parameter was given. + * @param parameter If specified this will return just the value for that key. - Default: '' + * @return An object containing the key value pairs found in the query string or just the value if a parameter was given. */ getQueryString(parameter?: string): string; @@ -11099,11 +11099,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If the value exists it is replaced with the new value given. If you don't provide a new value it is removed from the query string. * Optionally you can redirect to the new url, or just return it as a string. * - * @param key - The querystring key to update. - * @param value - The new value to be set. If it already exists it will be replaced. - * @param redirect - If true the browser will issue a redirect to the url with the new querystring. - * @param url - The URL to modify. If none is given it uses window.location.href. - * @return - If redirect is false then the modified url and query string is returned. + * @param key The querystring key to update. + * @param value The new value to be set. If it already exists it will be replaced. + * @param redirect If true the browser will issue a redirect to the url with the new querystring. + * @param url The URL to modify. If none is given it uses window.location.href. + * @return If redirect is false then the modified url and query string is returned. */ updateQueryString(key: string, value: any, redirect?: boolean, url?: string): string; @@ -11119,11 +11119,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Create a new `Particle` object. Particles are extended Sprites that are emitted by a particle emitter such as Phaser.Particles.Arcade.Emitter. * - * @param game - A reference to the currently running game. - * @param x - The x coordinate (in world space) to position the Particle at. - * @param y - The y coordinate (in world space) to position the Particle at. - * @param key - This is the image or texture used by the Particle during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. - * @param frame - If this Particle is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. + * @param game A reference to the currently running game. + * @param x The x coordinate (in world space) to position the Particle at. + * @param y The y coordinate (in world space) to position the Particle at. + * @param key This is the image or texture used by the Particle during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. + * @param frame If this Particle is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. */ constructor(game: Phaser.Game, x: number, y: number, key?: any, frame?: any); @@ -11138,10 +11138,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values. * If the Particle has a physics body that too is reset. * - * @param x - The x coordinate (in world space) to position the Particle at. - * @param y - The y coordinate (in world space) to position the Particle at. - * @param health - The health to give the Particle. - Default: 1 - * @return - (Phaser.Particle) This instance. + * @param x The x coordinate (in world space) to position the Particle at. + * @param y The y coordinate (in world space) to position the Particle at. + * @param health The health to give the Particle. - Default: 1 + * @return (Phaser.Particle) This instance. */ reset(x: number, y: number, health?: number): Phaser.Particle; @@ -11172,7 +11172,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Phaser.Particles is the Particle Manager for the game. It is called during the game update loop and in turn updates any Emitters attached to it. * - * @param game - A reference to the currently running game. + * @param game A reference to the currently running game. */ constructor(game: Phaser.Game); @@ -11197,15 +11197,15 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Adds a new Particle Emitter to the Particle Manager. * - * @param emitter - The emitter to be added to the particle manager. - * @return - The emitter that was added. + * @param emitter The emitter to be added to the particle manager. + * @return The emitter that was added. */ add(emitter: Phaser.Particles.Arcade.Emitter): Phaser.Particles.Arcade.Emitter; /** * Removes an existing Particle Emitter from the Particle Manager. * - * @param emitter - The emitter to remove. + * @param emitter The emitter to remove. */ remove(emitter: Phaser.Particles.Arcade.Emitter): void; @@ -11234,10 +11234,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * It can be used for one-time explosions or for continuous effects like rain and fire. * All it really does is launch Particle objects out at set intervals, and fixes their positions and velocities accordingly. * - * @param game - Current game instance. - * @param x - The x coordinate within the Emitter that the particles are emitted from. - Default: 0 - * @param y - The y coordinate within the Emitter that the particles are emitted from. - Default: 0 - * @param maxParticles - The total number of particles in this emitter. - Default: 50 + * @param game Current game instance. + * @param x The x coordinate within the Emitter that the particles are emitted from. - Default: 0 + * @param y The y coordinate within the Emitter that the particles are emitted from. - Default: 0 + * @param maxParticles The total number of particles in this emitter. - Default: 50 */ constructor(game: Phaser.Game, x?: number, y?: number, maxParticles?: number); @@ -11443,30 +11443,30 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Change the emitters center to match the center of any object with a `center` property, such as a Sprite. * If the object doesn't have a center property it will be set to object.x + object.width / 2 * - * @param object - The object that you wish to match the center with. + * @param object The object that you wish to match the center with. */ at(object: any): void; /** * This function can be used both internally and externally to emit the next particle in the queue. - * @return - True if a particle was emitted, otherwise false. + * @return True if a particle was emitted, otherwise false. */ emitParticle(): void; /** * Call this function to emit the given quantity of particles at all once (an explosion) * - * @param lifespan - How long each particle lives once emitted in ms. 0 = forever. - Default: 0 - * @param quantity - How many particles to launch. - Default: 0 + * @param lifespan How long each particle lives once emitted in ms. 0 = forever. - Default: 0 + * @param quantity How many particles to launch. - Default: 0 */ explode(lifespan?: number, quantity?: number): void; /** * Call this function to start emitting a flow of particles at the given frequency. * - * @param lifespan - How long each particle lives once emitted in ms. 0 = forever. - Default: 0 - * @param frequency - Frequency is how often to emit a particle, given in ms. - Default: 250 - * @param quantity - How many particles to launch. - Default: 0 + * @param lifespan How long each particle lives once emitted in ms. 0 = forever. - Default: 0 + * @param frequency Frequency is how often to emit a particle, given in ms. - Default: 250 + * @param quantity How many particles to launch. - Default: 0 */ flow(lifespan?: number, frequency?: number, quantity?: number): void; @@ -11479,12 +11479,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * This function generates a new set of particles for use by this emitter. * The particles are stored internally waiting to be emitted via Emitter.start. * - * @param keys - A string or an array of strings that the particle sprites will use as their texture. If an array one is picked at random. - * @param frames - A frame number, or array of frames that the sprite will use. If an array one is picked at random. - Default: 0 - * @param quantity - The number of particles to generate. If not given it will use the value of Emitter.maxParticles. If the value is greater than Emitter.maxParticles it will use Emitter.maxParticles as the quantity. - * @param collide - If you want the particles to be able to collide with other Arcade Physics bodies then set this to true. - Default: false - * @param collideWorldBounds - A particle can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World. - Default: false - * @return - This Emitter instance. + * @param keys A string or an array of strings that the particle sprites will use as their texture. If an array one is picked at random. + * @param frames A frame number, or array of frames that the sprite will use. If an array one is picked at random. - Default: 0 + * @param quantity The number of particles to generate. If not given it will use the value of Emitter.maxParticles. If the value is greater than Emitter.maxParticles it will use Emitter.maxParticles as the quantity. + * @param collide If you want the particles to be able to collide with other Arcade Physics bodies then set this to true. - Default: false + * @param collideWorldBounds A particle can be set to collide against the World bounds automatically and rebound back into the World if this is set to true. Otherwise it will leave the World. - Default: false + * @return This Emitter instance. */ makeParticles(keys: any, frames?: any, quantity?: number, collide?: boolean, collideWorldBounds?: boolean): Phaser.Particles.Arcade.Emitter; reset(x: number, y: number, health?: number): Phaser.Particles; @@ -11494,19 +11494,19 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The rate parameter, if set to a value above zero, lets you set the speed at which the Particle change in alpha from min to max. * If rate is zero, which is the default, the particle won't change alpha - instead it will pick a random alpha between min and max on emit. * - * @param min - The minimum value for this range. - Default: 1 - * @param max - The maximum value for this range. - Default: 1 - * @param rate - The rate (in ms) at which the particles will change in alpha from min to max, or set to zero to pick a random alpha between the two. - Default: 0 - * @param ease - If you've set a rate > 0 this is the easing formula applied between the min and max values. - Default: Phaser.Easing.Linear.None - * @param yoyo - If you've set a rate > 0 you can set if the ease will yoyo or not (i.e. ease back to its original values) - Default: false + * @param min The minimum value for this range. - Default: 1 + * @param max The maximum value for this range. - Default: 1 + * @param rate The rate (in ms) at which the particles will change in alpha from min to max, or set to zero to pick a random alpha between the two. - Default: 0 + * @param ease If you've set a rate > 0 this is the easing formula applied between the min and max values. - Default: Phaser.Easing.Linear.None + * @param yoyo If you've set a rate > 0 you can set if the ease will yoyo or not (i.e. ease back to its original values) - Default: false */ setAlpha(min?: number, max?: number, rate?: number, ease?: (k: number) => number, yoyo?: boolean): void; /** * A more compact way of setting the angular velocity constraints of the particles. * - * @param min - The minimum value for this range. - Default: 0 - * @param max - The maximum value for this range. - Default: 0 + * @param min The minimum value for this range. - Default: 0 + * @param max The maximum value for this range. - Default: 0 */ setRotation(min?: number, max?: number): void; @@ -11515,48 +11515,48 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The rate parameter, if set to a value above zero, lets you set the speed and ease which the Particle uses to change in scale from min to max across both axis. * If rate is zero, which is the default, the particle won't change scale during update, instead it will pick a random scale between min and max on emit. * - * @param minX - The minimum value of Particle.scale.x. - Default: 1 - * @param maxX - The maximum value of Particle.scale.x. - Default: 1 - * @param minY - The minimum value of Particle.scale.y. - Default: 1 - * @param maxY - The maximum value of Particle.scale.y. - Default: 1 - * @param rate - The rate (in ms) at which the particles will change in scale from min to max, or set to zero to pick a random size between the two. - Default: 0 - * @param ease - If you've set a rate > 0 this is the easing formula applied between the min and max values. - Default: Phaser.Easing.Linear.None - * @param yoyo - If you've set a rate > 0 you can set if the ease will yoyo or not (i.e. ease back to its original values) - Default: false + * @param minX The minimum value of Particle.scale.x. - Default: 1 + * @param maxX The maximum value of Particle.scale.x. - Default: 1 + * @param minY The minimum value of Particle.scale.y. - Default: 1 + * @param maxY The maximum value of Particle.scale.y. - Default: 1 + * @param rate The rate (in ms) at which the particles will change in scale from min to max, or set to zero to pick a random size between the two. - Default: 0 + * @param ease If you've set a rate > 0 this is the easing formula applied between the min and max values. - Default: Phaser.Easing.Linear.None + * @param yoyo If you've set a rate > 0 you can set if the ease will yoyo or not (i.e. ease back to its original values) - Default: false */ setScale(minX?: number, maxX?: number, minY?: number, maxY?: number, rate?: number, ease?: (k: number) => number, yoyo?: boolean): void; /** * A more compact way of setting the width and height of the emitter. * - * @param width - The desired width of the emitter (particles are spawned randomly within these dimensions). - * @param height - The desired height of the emitter. + * @param width The desired width of the emitter (particles are spawned randomly within these dimensions). + * @param height The desired height of the emitter. */ setSize(width: number, height: number): void; /** * A more compact way of setting the X velocity range of the emitter. * - * @param min - The minimum value for this range. - Default: 0 - * @param max - The maximum value for this range. - Default: 0 + * @param min The minimum value for this range. - Default: 0 + * @param max The maximum value for this range. - Default: 0 */ setXSpeed(min: number, max: number): void; /** * A more compact way of setting the Y velocity range of the emitter. * - * @param min - The minimum value for this range. - Default: 0 - * @param max - The maximum value for this range. - Default: 0 + * @param min The minimum value for this range. - Default: 0 + * @param max The maximum value for this range. - Default: 0 */ setYSpeed(min: number, max: number): void; /** * Call this function to start emitting particles. * - * @param explode - Whether the particles should all burst out at once (true) or at the frequency given (false). - Default: true - * @param lifespan - How long each particle lives once emitted in ms. 0 = forever. - Default: 0 - * @param frequency - Ignored if Explode is set to true. Frequency is how often to emit 1 particle. Value given in ms. - Default: 250 - * @param quantity - How many particles to launch. 0 = "all of the particles" which will keep emitting until Emitter.maxParticles is reached. - Default: 0 - * @param forceQuantity - If `true` and creating a particle flow, the quantity emitted will be forced to the be quantity given in this call. This can never exceed Emitter.maxParticles. - Default: false + * @param explode Whether the particles should all burst out at once (true) or at the frequency given (false). - Default: true + * @param lifespan How long each particle lives once emitted in ms. 0 = forever. - Default: 0 + * @param frequency Ignored if Explode is set to true. Frequency is how often to emit 1 particle. Value given in ms. - Default: 250 + * @param quantity How many particles to launch. 0 = "all of the particles" which will keep emitting until Emitter.maxParticles is reached. - Default: 0 + * @param forceQuantity If `true` and creating a particle flow, the quantity emitted will be forced to the be quantity given in this call. This can never exceed Emitter.maxParticles. - Default: false */ start(explode?: boolean, lifespan?: number, frequency?: number, quantity?: number, forceQuantity?: boolean): void; @@ -11596,8 +11596,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * For example you could have P2 managing a polygon-built terrain landscape that an vehicle drives over, while it could be firing bullets that use the * faster (due to being much simpler) Arcade Physics system. * - * @param game - A reference to the currently running game. - * @param physicsConfig - A physics configuration object to pass to the Physics world on creation. - Default: null + * @param game A reference to the currently running game. + * @param physicsConfig A physics configuration object to pass to the Physics world on creation. - Default: null */ constructor(game: Phaser.Game, config?: any); @@ -11658,9 +11658,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If you require more control over what type of body is created, for example to create a Ninja Physics Circle instead of the default AABB, then see the * individual physics systems `enable` methods instead of using this generic one. * - * @param object - The game object to create the physics body on. Can also be an array of objects, a body will be created on every object in the array. - * @param system - The physics system that will be used to create the body. Defaults to Arcade Physics. - Default: Phaser.Physics.ARCADE - * @param debug - Enable the debug drawing for this body. Defaults to false. - Default: false + * @param object The game object to create the physics body on. Can also be an array of objects, a body will be created on every object in the array. + * @param system The physics system that will be used to create the body. Defaults to Arcade Physics. - Default: Phaser.Physics.ARCADE + * @param debug Enable the debug drawing for this body. Defaults to false. - Default: false */ enable(object: any, system?: number, debug?: boolean): void; @@ -11696,7 +11696,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * calling startSystem will reset the physics world, not re-create it. If you need to start them again from their constructors * then set Phaser.Physics.p2 (or whichever system you want to recreate) to `null` before calling `startSystem`. * - * @param system - The physics system to start: Phaser.Physics.ARCADE, Phaser.Physics.P2JS, Phaser.Physics.NINJA or Phaser.Physics.BOX2D. + * @param system The physics system to start: Phaser.Physics.ARCADE, Phaser.Physics.P2JS, Phaser.Physics.NINJA or Phaser.Physics.BOX2D. */ startSystem(system: number): void; @@ -11730,7 +11730,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * The Arcade Physics world. Contains Arcade Physics related collision, overlap and motion methods. * - * @param game - reference to the current game instance. + * @param game reference to the current game instance. */ constructor(game: Phaser.Game); @@ -11786,10 +11786,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Given the rotation (in radians) and speed calculate the acceleration and return it as a Point object, or set it to the given point object. * One way to use this is: accelerationFromRotation(rotation, 200, sprite.acceleration) which will set the values directly to the sprites acceleration and not create a new Point object. * - * @param rotation - The angle in radians. - * @param speed - The speed it will move, in pixels per second sq. - Default: 60 - * @param point - The Point object in which the x and y properties will be set to the calculated acceleration. - * @return - - A Point where point.x contains the acceleration x value and point.y contains the acceleration y value. + * @param rotation The angle in radians. + * @param speed The speed it will move, in pixels per second sq. - Default: 60 + * @param point The Point object in which the x and y properties will be set to the calculated acceleration. + * @return - A Point where point.x contains the acceleration x value and point.y contains the acceleration y value. */ accelerationFromRotation(rotation: number, speed?: number, point?: Phaser.Point): Phaser.Point; @@ -11799,12 +11799,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. * Note: The display object doesn't stop moving once it reaches the destination coordinates. * - * @param displayObject - The display object to move. - * @param destination - The display object to move towards. Can be any object but must have visible x/y properties. - * @param speed - The speed it will accelerate in pixels per second. - Default: 60 - * @param xSpeedMax - The maximum x velocity the display object can reach. - Default: 500 - * @param ySpeedMax - The maximum y velocity the display object can reach. - Default: 500 - * @return - The angle (in radians) that the object should be visually set to in order to match its new trajectory. + * @param displayObject The display object to move. + * @param destination The display object to move towards. Can be any object but must have visible x/y properties. + * @param speed The speed it will accelerate in pixels per second. - Default: 60 + * @param xSpeedMax The maximum x velocity the display object can reach. - Default: 500 + * @param ySpeedMax The maximum y velocity the display object can reach. - Default: 500 + * @return The angle (in radians) that the object should be visually set to in order to match its new trajectory. */ accelerateToObject(displayObject: any, destination: any, speed?: number, xSpeedMax?: number, ySpeedMax?: number): number; @@ -11814,12 +11814,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. * Note: The display object doesn't stop moving once it reaches the destination coordinates. * - * @param displayObject - The display object to move. - * @param pointer - The pointer to move towards. Defaults to Phaser.Input.activePointer. - * @param speed - The speed it will accelerate in pixels per second. - Default: 60 - * @param xSpeedMax - The maximum x velocity the display object can reach. - Default: 500 - * @param ySpeedMax - The maximum y velocity the display object can reach. - Default: 500 - * @return - The angle (in radians) that the object should be visually set to in order to match its new trajectory. + * @param displayObject The display object to move. + * @param pointer The pointer to move towards. Defaults to Phaser.Input.activePointer. + * @param speed The speed it will accelerate in pixels per second. - Default: 60 + * @param xSpeedMax The maximum x velocity the display object can reach. - Default: 500 + * @param ySpeedMax The maximum y velocity the display object can reach. - Default: 500 + * @return The angle (in radians) that the object should be visually set to in order to match its new trajectory. */ accelerateToPointer(displayObject: any, pointer?: Phaser.Pointer, speed?: number, xSpeedMax?: number, ySpeedMax?: number): number; @@ -11829,41 +11829,41 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. * Note: The display object doesn't stop moving once it reaches the destination coordinates. * - * @param displayObject - The display object to move. - * @param x - The x coordinate to accelerate towards. - * @param y - The y coordinate to accelerate towards. - * @param speed - The speed it will accelerate in pixels per second. - Default: 60 - * @param xSpeedMax - The maximum x velocity the display object can reach. - Default: 500 - * @param ySpeedMax - The maximum y velocity the display object can reach. - Default: 500 - * @return - The angle (in radians) that the object should be visually set to in order to match its new trajectory. + * @param displayObject The display object to move. + * @param x The x coordinate to accelerate towards. + * @param y The y coordinate to accelerate towards. + * @param speed The speed it will accelerate in pixels per second. - Default: 60 + * @param xSpeedMax The maximum x velocity the display object can reach. - Default: 500 + * @param ySpeedMax The maximum y velocity the display object can reach. - Default: 500 + * @return The angle (in radians) that the object should be visually set to in order to match its new trajectory. */ accelerateToXY(displayObject: any, x: number, y: number, speed?: number, xSpeedMax?: number, ySpeedMax?: number): number; /** * Find the angle in radians between two display objects (like Sprites). * - * @param source - The Display Object to test from. - * @param target - The Display Object to test to. - * @return - The angle in radians between the source and target display objects. + * @param source The Display Object to test from. + * @param target The Display Object to test to. + * @return The angle in radians between the source and target display objects. */ angleBetween(source: any, target: any): number; /** * Find the angle in radians between a display object (like a Sprite) and a Pointer, taking their x/y and center into account. * - * @param displayObject - The Display Object to test from. - * @param pointer - The Phaser.Pointer to test to. If none is given then Input.activePointer is used. - * @return - The angle in radians between displayObject.x/y to Pointer.x/y + * @param displayObject The Display Object to test from. + * @param pointer The Phaser.Pointer to test to. If none is given then Input.activePointer is used. + * @return The angle in radians between displayObject.x/y to Pointer.x/y */ angleToPointer(displayObject: any, pointer?: Phaser.Pointer): number; /** * Find the angle in radians between a display object (like a Sprite) and the given x/y coordinate. * - * @param displayObject - The Display Object to test from. - * @param x - The x coordinate to get the angle to. - * @param y - The y coordinate to get the angle to. - * @return - The angle in radians between displayObject.x/y to Pointer.x/y + * @param displayObject The Display Object to test from. + * @param x The x coordinate to get the angle to. + * @param y The y coordinate to get the angle to. + * @return The angle in radians between displayObject.x/y to Pointer.x/y */ angleToXY(displayObject: any, x: number, y: number): number; @@ -11877,12 +11877,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called. * NOTE: This function is not recursive, and will not test against children of objects passed (i.e. Groups or Tilemaps within other Groups). * - * @param object1 - The first object or array of objects to check. Can be Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.TilemapLayer. - * @param object2 - The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.TilemapLayer. - * @param collideCallback - An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them, unless you are colliding Group vs. Sprite, in which case Sprite will always be the first parameter. - Default: null - * @param processCallback - A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them. - Default: null - * @param callbackContext - The context in which to run the callbacks. - * @return - True if a collision occurred otherwise false. + * @param object1 The first object or array of objects to check. Can be Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.TilemapLayer. + * @param object2 The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.TilemapLayer. + * @param collideCallback An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them, unless you are colliding Group vs. Sprite, in which case Sprite will always be the first parameter. - Default: null + * @param processCallback A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them. - Default: null + * @param callbackContext The context in which to run the callbacks. + * @return True if a collision occurred otherwise false. */ collide(object1: any, object2: any, collideCallback?: Function, processCallback?: Function, callbackContext?: any): boolean; @@ -11890,22 +11890,22 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * A tween-like function that takes a starting velocity and some other factors and returns an altered velocity. * Based on a function in Flixel by @ADAMATOMIC * - * @param axis - 0 for nothing, 1 for horizontal, 2 for vertical. - * @param body - The Body object to be updated. - * @param velocity - Any component of velocity (e.g. 20). - * @param acceleration - Rate at which the velocity is changing. - * @param drag - Really kind of a deceleration, this is how much the velocity changes if Acceleration is not set. - * @param max - An absolute value cap for the velocity. - Default: 10000 - * @return - The altered Velocity value. + * @param axis 0 for nothing, 1 for horizontal, 2 for vertical. + * @param body The Body object to be updated. + * @param velocity Any component of velocity (e.g. 20). + * @param acceleration Rate at which the velocity is changing. + * @param drag Really kind of a deceleration, this is how much the velocity changes if Acceleration is not set. + * @param max An absolute value cap for the velocity. - Default: 10000 + * @return The altered Velocity value. */ computeVelocity(axis: number, body: Phaser.Physics.Arcade.Body, velocity: number, acceleration: number, drag: number, max?: number): number; /** * Find the distance between two display objects (like Sprites). * - * @param source - The Display Object to test from. - * @param target - The Display Object to test to. - * @return - The distance between the source and target objects. + * @param source The Display Object to test from. + * @param target The Display Object to test to. + * @return The distance between the source and target objects. */ distanceBetween(source: any, target: any): number; @@ -11914,9 +11914,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed. * If you need to calculate from the center of a display object instead use the method distanceBetweenCenters() * - * @param displayObject - The Display Object to test from. - * @param pointer - The Phaser.Pointer to test to. If none is given then Input.activePointer is used. - * @return - The distance between the object and the Pointer. + * @param displayObject The Display Object to test from. + * @param pointer The Phaser.Pointer to test to. If none is given then Input.activePointer is used. + * @return The distance between the object and the Pointer. */ distanceToPointer(displayObject: any, pointer?: Phaser.Pointer): number; @@ -11925,10 +11925,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The calculation is made from the display objects x/y coordinate. This may be the top-left if its anchor hasn't been changed. * If you need to calculate from the center of a display object instead use the method distanceBetweenCenters() * - * @param displayObject - The Display Object to test from. - * @param x - The x coordinate to move towards. - * @param y - The y coordinate to move towards. - * @return - The distance between the object and the x/y coordinates. + * @param displayObject The Display Object to test from. + * @param x The x coordinate to move towards. + * @param y The y coordinate to move towards. + * @return The distance between the object and the x/y coordinates. */ distanceToXY(displayObject: any, x: number, y: number): number; @@ -11936,8 +11936,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * This will create an Arcade Physics body on the given game object or array of game objects. * A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. * - * @param object - The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. - * @param children - Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. - Default: true + * @param object The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. + * @param children Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. - Default: true */ enable(object: any, children?: Boolean): void; @@ -11945,7 +11945,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Creates an Arcade Physics body on the given game object. * A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled. * - * @param object - The game object to create the physics body on. A body will only be created if this object has a null `body` property. + * @param object The game object to create the physics body on. A body will only be created if this object has a null `body` property. */ enableBody(object: any): void; @@ -11954,21 +11954,21 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Each child will be sent to the given callback for further processing. * Note that the children are not checked for depth order, but simply if they overlap the coordinate or not. * - * @param pointer - The Pointer to check. - * @param group - The Group to check. - * @param callback - A callback function that is called if the object overlaps the coordinates. The callback will be sent two parameters: the callbackArg and the Object that overlapped the location. - * @param callbackContext - The context in which to run the callback. - * @param callbackArg - An argument to pass to the callback. - * @return - An array of the Sprites from the Group that overlapped the coordinates. + * @param pointer The Pointer to check. + * @param group The Group to check. + * @param callback A callback function that is called if the object overlaps the coordinates. The callback will be sent two parameters: the callbackArg and the Object that overlapped the location. + * @param callbackContext The context in which to run the callback. + * @param callbackArg An argument to pass to the callback. + * @return An array of the Sprites from the Group that overlapped the coordinates. */ getObjectsAtLocation(x: number, y: number, group: Phaser.Group, callback?: (callbackArg: any, object: any) => void, callbackContext?: any, callbackArg?: any): Sprite[]; /** * Check for intersection against two bodies. * - * @param body1 - The Body object to check. - * @param body2 - The Body object to check. - * @return - True if they intersect, otherwise false. + * @param body1 The Body object to check. + * @param body2 The Body object to check. + * @return True if they intersect, otherwise false. */ intersects(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body): boolean; @@ -11980,11 +11980,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Note: The display object doesn't stop moving once it reaches the destination coordinates. * Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all) * - * @param displayObject - The display object to move. - * @param destination - The display object to move towards. Can be any object but must have visible x/y properties. - * @param speed - The speed it will move, in pixels per second (default is 60 pixels/sec) - Default: 60 - * @param maxTime - Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms. - Default: 0 - * @return - The angle (in radians) that the object should be visually set to in order to match its new velocity. + * @param displayObject The display object to move. + * @param destination The display object to move towards. Can be any object but must have visible x/y properties. + * @param speed The speed it will move, in pixels per second (default is 60 pixels/sec) - Default: 60 + * @param maxTime Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms. - Default: 0 + * @return The angle (in radians) that the object should be visually set to in order to match its new velocity. */ moveToObject(displayObject: any, destination: any, speed?: number, maxTime?: number): number; @@ -11995,11 +11995,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Note: The display object does not continuously track the target. If the target changes location during transit the display object will not modify its course. * Note: The display object doesn't stop moving once it reaches the destination coordinates. * - * @param displayObject - The display object to move. - * @param speed - The speed it will move, in pixels per second (default is 60 pixels/sec) - Default: 60 - * @param pointer - The pointer to move towards. Defaults to Phaser.Input.activePointer. - * @param maxTime - Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms. - Default: 0 - * @return - The angle (in radians) that the object should be visually set to in order to match its new velocity. + * @param displayObject The display object to move. + * @param speed The speed it will move, in pixels per second (default is 60 pixels/sec) - Default: 60 + * @param pointer The pointer to move towards. Defaults to Phaser.Input.activePointer. + * @param maxTime Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms. - Default: 0 + * @return The angle (in radians) that the object should be visually set to in order to match its new velocity. */ moveToPointer(displayObject: any, speed?: number, pointer?: Phaser.Pointer, maxTime?: number): number; @@ -12011,12 +12011,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Note: The display object doesn't stop moving once it reaches the destination coordinates. * Note: Doesn't take into account acceleration, maxVelocity or drag (if you've set drag or acceleration too high this object may not move at all) * - * @param displayObject - The display object to move. - * @param x - The x coordinate to move towards. - * @param y - The y coordinate to move towards. - * @param speed - The speed it will move, in pixels per second (default is 60 pixels/sec) - Default: 60 - * @param maxTime - Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms. - Default: 0 - * @return - The angle (in radians) that the object should be visually set to in order to match its new velocity. + * @param displayObject The display object to move. + * @param x The x coordinate to move towards. + * @param y The y coordinate to move towards. + * @param speed The speed it will move, in pixels per second (default is 60 pixels/sec) - Default: 60 + * @param maxTime Time given in milliseconds (1000 = 1 sec). If set the speed is adjusted so the object will arrive at destination in the given number of ms. - Default: 0 + * @return The angle (in radians) that the object should be visually set to in order to match its new velocity. */ moveToXY(displayObject: any, x: number, y: number, speed?: number, maxTime?: number): number; @@ -12028,39 +12028,39 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If two arrays are passed, the contents of the first parameter will be tested against all contents of the 2nd parameter. * NOTE: This function is not recursive, and will not test against children of objects passed (i.e. Groups within Groups). * - * @param object1 - The first object or array of objects to check. Can be Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter. - * @param object2 - The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter. - * @param overlapCallback - An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you specified them. - Default: null - * @param processCallback - A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then overlapCallback will only be called if processCallback returns true. - Default: null - * @param callbackContext - The context in which to run the callbacks. - * @return - True if an overlap occurred otherwise false. + * @param object1 The first object or array of objects to check. Can be Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter. + * @param object2 The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter. + * @param overlapCallback An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you specified them. - Default: null + * @param processCallback A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then overlapCallback will only be called if processCallback returns true. - Default: null + * @param callbackContext The context in which to run the callbacks. + * @return True if an overlap occurred otherwise false. */ overlap(object1: any, object2: any, overlapCallback?: Function, processCallback?: Function, callbackContext?: any): boolean; /** * Internal function to process the separation of a physics body from a tile. * - * @param body - The Body object to separate. - * @param x - The x separation amount. - * @return - Returns true as a pass-thru to the separateTile method. + * @param body The Body object to separate. + * @param x The x separation amount. + * @return Returns true as a pass-thru to the separateTile method. */ processTileSeparationX(body: Phaser.Physics.Arcade.Body, x: number): boolean; /** * Internal function to process the separation of a physics body from a tile. * - * @param body - The Body object to separate. - * @param y - The y separation amount. + * @param body The Body object to separate. + * @param y The y separation amount. */ processTileSeparationY(body: Phaser.Physics.Arcade.Body, y: number): void; /** * Updates the size of this physics world. * - * @param x - Top left most corner of the world. - * @param y - Top left most corner of the world. - * @param width - New width of the world. Can never be smaller than the Game.width. - * @param height - New height of the world. Can never be smaller than the Game.height. + * @param x Top left most corner of the world. + * @param y Top left most corner of the world. + * @param width New width of the world. Can never be smaller than the Game.width. + * @param height New height of the world. Can never be smaller than the Game.height. */ setBounds(x: number, y: number, width: number, height: number): void; @@ -12072,66 +12072,66 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * The core separation function to separate two physics bodies. * - * @param body1 - The first Body object to separate. - * @param body2 - The second Body object to separate. - * @param processCallback - A callback function that lets you perform additional checks against the two objects if they overlap. If this function is set then the sprites will only be collided if it returns true. - Default: null - * @param callbackContext - The context in which to run the process callback. - * @param overlapOnly - Just run an overlap or a full collision. - * @return - Returns true if the bodies collided, otherwise false. + * @param body1 The first Body object to separate. + * @param body2 The second Body object to separate. + * @param processCallback A callback function that lets you perform additional checks against the two objects if they overlap. If this function is set then the sprites will only be collided if it returns true. - Default: null + * @param callbackContext The context in which to run the process callback. + * @param overlapOnly Just run an overlap or a full collision. + * @return Returns true if the bodies collided, otherwise false. */ separate(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, processCallback?: Function, callbackContext?: any, overlapOnly?: boolean): boolean; /** * The core separation function to separate two physics bodies on the x axis. * - * @param body1 - The Body object to separate. - * @param body2 - The Body object to separate. - * @param overlapOnly - If true the bodies will only have their overlap data set, no separation or exchange of velocity will take place. - * @return - Returns true if the bodies were separated, otherwise false. + * @param body1 The Body object to separate. + * @param body2 The Body object to separate. + * @param overlapOnly If true the bodies will only have their overlap data set, no separation or exchange of velocity will take place. + * @return Returns true if the bodies were separated, otherwise false. */ separateX(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly: boolean): boolean; /** * The core separation function to separate two physics bodies on the y axis. * - * @param body1 - The Body object to separate. - * @param body2 - The Body object to separate. - * @param overlapOnly - If true the bodies will only have their overlap data set, no separation or exchange of velocity will take place. - * @return - Returns true if the bodies were separated, otherwise false. + * @param body1 The Body object to separate. + * @param body2 The Body object to separate. + * @param overlapOnly If true the bodies will only have their overlap data set, no separation or exchange of velocity will take place. + * @return Returns true if the bodies were separated, otherwise false. */ separateY(body1: Phaser.Physics.Arcade.Body, body2: Phaser.Physics.Arcade.Body, overlapOnly: boolean): boolean; /** * The core separation function to separate a physics body and a tile. * - * @param body - The Body object to separate. - * @param tile - The tile to collide against. - * @return - Returns true if the body was separated, otherwise false. + * @param body The Body object to separate. + * @param tile The tile to collide against. + * @return Returns true if the body was separated, otherwise false. */ separateTile(i: number, body: Phaser.Physics.Arcade.Body, tile: Phaser.Tile): boolean; /** * Check the body against the given tile on the X axis. * - * @param body - The Body object to separate. - * @param tile - The tile to check. - * @return - The amount of separation that occurred. + * @param body The Body object to separate. + * @param tile The tile to check. + * @return The amount of separation that occurred. */ tileCheckX(body: Phaser.Physics.Arcade.Body, tile: Phaser.Tile): number; /** * Check the body against the given tile on the Y axis. * - * @param body - The Body object to separate. - * @param tile - The tile to check. - * @return - The amount of separation that occurred. + * @param body The Body object to separate. + * @param tile The tile to check. + * @return The amount of separation that occurred. */ tileCheckY(body: Phaser.Physics.Arcade.Body, tile: Phaser.Tile): number; /** * Called automatically by a Physics body, it updates all motion related values on the Body unless `World.isPaused` is `true`. * - * @param The - Body object to be updated. + * @param The Body object to be updated. */ updateMotion(body: Phaser.Physics.Arcade.Body): void; @@ -12139,10 +12139,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Given the angle (in degrees) and speed calculate the velocity and return it as a Point object, or set it to the given point object. * One way to use this is: velocityFromAngle(angle, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object. * - * @param angle - The angle in degrees calculated in clockwise positive direction (down = 90 degrees positive, right = 0 degrees positive, up = 90 degrees negative) - * @param speed - The speed it will move, in pixels per second sq. - Default: 60 - * @param point - The Point object in which the x and y properties will be set to the calculated velocity. - * @return - - A Point where point.x contains the velocity x value and point.y contains the velocity y value. + * @param angle The angle in degrees calculated in clockwise positive direction (down = 90 degrees positive, right = 0 degrees positive, up = 90 degrees negative) + * @param speed The speed it will move, in pixels per second sq. - Default: 60 + * @param point The Point object in which the x and y properties will be set to the calculated velocity. + * @return - A Point where point.x contains the velocity x value and point.y contains the velocity y value. */ velocityFromAngle(angle: number, speed?: number, point?: Phaser.Point): Phaser.Point; @@ -12150,10 +12150,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Given the rotation (in radians) and speed calculate the velocity and return it as a Point object, or set it to the given point object. * One way to use this is: velocityFromRotation(rotation, 200, sprite.velocity) which will set the values directly to the sprites velocity and not create a new Point object. * - * @param rotation - The angle in radians. - * @param speed - The speed it will move, in pixels per second sq. - Default: 60 - * @param point - The Point object in which the x and y properties will be set to the calculated velocity. - * @return - - A Point where point.x contains the velocity x value and point.y contains the velocity y value. + * @param rotation The angle in radians. + * @param speed The speed it will move, in pixels per second sq. - Default: 60 + * @param point The Point object in which the x and y properties will be set to the calculated velocity. + * @return - A Point where point.x contains the velocity x value and point.y contains the velocity y value. */ velocityFromRotation(rotation: number, speed?: number, point?: Phaser.Point): Phaser.Point; @@ -12173,7 +12173,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than * the Sprite itself. For example you can set the velocity, acceleration, bounce values etc all on the Body. * - * @param sprite - The Sprite object this physics body belongs to. + * @param sprite The Sprite object this physics body belongs to. */ constructor(sprite: Phaser.Sprite); @@ -12466,31 +12466,31 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Returns the delta x value. The difference between Body.x now and in the previous step. - * @return - The delta value. Positive if the motion was to the right, negative if to the left. + * @return The delta value. Positive if the motion was to the right, negative if to the left. */ deltaX(): number; /** * Returns the delta y value. The difference between Body.y now and in the previous step. - * @return - The delta value. Positive if the motion was downwards, negative if upwards. + * @return The delta value. Positive if the motion was downwards, negative if upwards. */ deltaY(): number; /** * Returns the delta z value. The difference between Body.rotation now and in the previous step. - * @return - The delta value. Positive if the motion was clockwise, negative if anti-clockwise. + * @return The delta value. Positive if the motion was clockwise, negative if anti-clockwise. */ deltaZ(): number; /** * Returns the absolute delta x value. - * @return - The absolute delta value. + * @return The absolute delta value. */ deltaAbsX(): void; /** * Returns the absolute delta y value. - * @return - The absolute delta value. + * @return The absolute delta value. */ deltaAbsY(): void; @@ -12502,21 +12502,21 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Tests if a world point lies within this Body. * - * @param x - The world x coordinate to test. - * @param y - The world y coordinate to test. - * @return - True if the given coordinates are inside this Body, otherwise false. + * @param x The world x coordinate to test. + * @param y The world y coordinate to test. + * @return True if the given coordinates are inside this Body, otherwise false. */ hitTest(x: number, y: number): boolean; /** * Returns true if the bottom of this Body is in contact with either the world bounds or a tile. - * @return - True if in contact with either the world bounds or a tile. + * @return True if in contact with either the world bounds or a tile. */ onFloor(): void; /** * Returns true if either side of this Body is in contact with either the world bounds or a tile. - * @return - True if in contact with either the world bounds or a tile. + * @return True if in contact with either the world bounds or a tile. */ onWall(): void; @@ -12533,28 +12533,28 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Render Sprite Body. * - * @param context - The context to render to. - * @param body - The Body to render the info of. - * @param color - color of the debug info to be rendered. (format is css color string). - Default: 'rgba(0,255,0,0.4)' - * @param filled - Render the objected as a filled (default, true) or a stroked (false) - Default: true + * @param context The context to render to. + * @param body The Body to render the info of. + * @param color color of the debug info to be rendered. (format is css color string). - Default: 'rgba(0,255,0,0.4)' + * @param filled Render the objected as a filled (default, true) or a stroked (false) - Default: true */ render(context: any, body: Phaser.Physics.Arcade.Body, color?: string, filled?: boolean): void; /** * Render Sprite Body Physics Data as text. * - * @param body - The Body to render the info of. - * @param x - X position of the debug info to be rendered. - * @param y - Y position of the debug info to be rendered. - * @param color - color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' + * @param body The Body to render the info of. + * @param x X position of the debug info to be rendered. + * @param y Y position of the debug info to be rendered. + * @param color color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' */ renderBodyInfo(debug: Phaser.Utils.Debug, body: Phaser.Physics.Arcade.Body): void; /** * Resets all Body values (velocity, acceleration, rotation, etc) * - * @param x - The new x position of the Body. - * @param y - The new y position of the Body. + * @param x The new x position of the Body. + * @param y The new y position of the Body. */ reset(x: number, y: number): void; @@ -12563,10 +12563,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * So it could be smaller or larger than the parent Sprite. You can also control the x and y offset, which * is the position of the Body relative to the top-left of the Sprite. * - * @param width - The width of the Body. - * @param height - The height of the Body. - * @param offsetX - The X offset of the Body from the Sprite position. - * @param offsetY - The Y offset of the Body from the Sprite position. + * @param width The width of the Body. + * @param height The height of the Body. + * @param offsetX The X offset of the Body from the Sprite position. + * @param offsetY The Y offset of the Body from the Sprite position. */ setSize(width: number, height: number, offsetX?: number, offsetY?: number): void; @@ -12629,7 +12629,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Feel free to attempt any of the above and submit a Pull Request with your code! Be sure to include test cases proving they work. * - * @param game - reference to the current game instance. + * @param game reference to the current game instance. */ constructor(game: Phaser.Game); @@ -12673,8 +12673,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Clears all physics bodies from the given TilemapLayer that were created with `World.convertTilemap`. * - * @param map - The Tilemap to get the map data from. - * @param layer - The layer to operate on. If not given will default to map.currentLayer. + * @param map The Tilemap to get the map data from. + * @param layer The layer to operate on. If not given will default to map.currentLayer. */ clearTilemapLayerBodies(map: Phaser.Tilemap, layer: any): void; @@ -12686,12 +12686,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * giving you the chance to perform additional checks. If the function returns true then the collision and separation is carried out. If it returns false it is skipped. * The collideCallback is an optional function that is only called if two sprites collide. If a processCallback has been set then it needs to return true for collideCallback to be called. * - * @param object1 - The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.TilemapLayer. - * @param object2 - The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.TilemapLayer. - * @param collideCallback - An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them. - Default: null - * @param processCallback - A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them. - Default: null - * @param callbackContext - The context in which to run the callbacks. - * @return - True if a collision occured otherwise false. + * @param object1 The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter, or Phaser.TilemapLayer. + * @param object2 The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group, Phaser.Particles.Emitter or Phaser.TilemapLayer. + * @param collideCallback An optional callback function that is called if the objects collide. The two objects will be passed to this function in the same order in which you specified them. - Default: null + * @param processCallback A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then collision will only happen if processCallback returns true. The two objects will be passed to this function in the same order in which you specified them. - Default: null + * @param callbackContext The context in which to run the callbacks. + * @return True if a collision occured otherwise false. */ collide(object1: any, object2: any, collideCallback?: Function, processCallback?: Function, callbackContext?: any): boolean; @@ -12708,10 +12708,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Your slopeMap array would look like this: `[ 1, 1, 1, 1, 2, 3 ]`. * Where each element of the array is a tile in your tilemap and the resulting Ninja Tile it should create. * - * @param map - The Tilemap to get the map data from. - * @param layer - The layer to operate on. If not given will default to map.currentLayer. - * @param slopeMap - The tilemap index to Tile ID map. - * @return - An array of the Phaser.Physics.Ninja.Tile objects that were created. + * @param map The Tilemap to get the map data from. + * @param layer The layer to operate on. If not given will default to map.currentLayer. + * @param slopeMap The tilemap index to Tile ID map. + * @return An array of the Phaser.Physics.Ninja.Tile objects that were created. */ convertTilemap(map: Phaser.Tilemap, layer?: any, slopeMap?: any): Phaser.Physics.Ninja.Tile[]; @@ -12719,8 +12719,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * This will create a Ninja Physics AABB body on the given game object. Its dimensions will match the width and height of the object at the point it is created. * A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. * - * @param object - The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. - * @param children - Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. - Default: true + * @param object The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. + * @param children Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. - Default: true */ enableAABB(object: any, children?: boolean): void; @@ -12728,9 +12728,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * This will create a Ninja Physics Circle body on the given game object. * A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. * - * @param object - The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. - * @param radius - The radius of the Circle. - * @param children - Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. - Default: true + * @param object The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. + * @param radius The radius of the Circle. + * @param children Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. - Default: true */ enableCircle(object: any, radius: number, children?: boolean): void; @@ -12740,9 +12740,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Note that for all degree based tile types they need to have an equal width and height. If the given object doesn't have equal width and height it will use the width. * A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. * - * @param object - The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. - * @param id - The type of Tile this will use, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc. - Default: 1 - * @param children - Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. - Default: true + * @param object The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. + * @param id The type of Tile this will use, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc. - Default: 1 + * @param children Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. - Default: true */ enableTile(object: any, id: number, children?: boolean): void; @@ -12750,11 +12750,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * This will create a Ninja Physics body on the given game object or array of game objects. * A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. * - * @param object - The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. - * @param type - The type of Ninja shape to create. 1 = AABB, 2 = Circle or 3 = Tile. - Default: 1 - * @param id - If this body is using a Tile shape, you can set the Tile id here, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc. - Default: 1 - * @param radius - If this body is using a Circle shape this controls the radius. - Default: 0 - * @param children - Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. - Default: true + * @param object The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. + * @param type The type of Ninja shape to create. 1 = AABB, 2 = Circle or 3 = Tile. - Default: 1 + * @param id If this body is using a Tile shape, you can set the Tile id here, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc. - Default: 1 + * @param radius If this body is using a Circle shape this controls the radius. - Default: 0 + * @param children Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. - Default: true */ enable(object: any, type?: number, id?: number, radius?: number, children?: boolean): void; @@ -12762,7 +12762,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Creates a Ninja Physics body on the given game object. * A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled. * - * @param object - The game object to create the physics body on. A body will only be created if this object has a null `body` property. + * @param object The game object to create the physics body on. A body will only be created if this object has a null `body` property. */ enableBody(object: any, type?: number, id?: number, radius?: number): void; @@ -12772,31 +12772,31 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Unlike collide the objects are NOT automatically separated or have any physics applied, they merely test for overlap results. * The second parameter can be an array of objects, of differing types. * - * @param object1 - The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter. - * @param object2 - The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter. - * @param overlapCallback - An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you specified them. - Default: null - * @param processCallback - A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then overlapCallback will only be called if processCallback returns true. - Default: null - * @param callbackContext - The context in which to run the callbacks. - * @return - True if an overlap occured otherwise false. + * @param object1 The first object to check. Can be an instance of Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter. + * @param object2 The second object or array of objects to check. Can be Phaser.Sprite, Phaser.Group or Phaser.Particles.Emitter. + * @param overlapCallback An optional callback function that is called if the objects overlap. The two objects will be passed to this function in the same order in which you specified them. - Default: null + * @param processCallback A callback function that lets you perform additional checks against the two objects if they overlap. If this is set then overlapCallback will only be called if processCallback returns true. - Default: null + * @param callbackContext The context in which to run the callbacks. + * @return True if an overlap occured otherwise false. */ overlap(object1: any, object2: any, overlapCallback?: Function, processCallback?: Function, callbackContext?: any): boolean; /** * The core separation function to separate two physics bodies. * - * @param body1 - The Body object to separate. - * @param body2 - The Body object to separate. - * @return - Returns true if the bodies collided, otherwise false. + * @param body1 The Body object to separate. + * @param body2 The Body object to separate. + * @return Returns true if the bodies collided, otherwise false. */ separate(body1: Phaser.Physics.Ninja.Body, body2: Phaser.Physics.Ninja.Body, processCallback?: Function, callbackContext?: any, overlapOnly?: boolean): boolean; /** * Updates the size of this physics world. * - * @param x - Top left most corner of the world. - * @param y - Top left most corner of the world. - * @param width - New width of the world. Can never be smaller than the Game.width. - * @param height - New height of the world. Can never be smaller than the Game.height. + * @param x Top left most corner of the world. + * @param y Top left most corner of the world. + * @param width New width of the world. Can never be smaller than the Game.width. + * @param height New height of the world. Can never be smaller than the Game.height. */ setBounds(x: number, y: number, width: number, height: number): void; @@ -12820,15 +12820,15 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The Physics Body is linked to a single Sprite. All physics operations should be performed against the body rather than * the Sprite itself. For example you can set the velocity, bounce values etc all on the Body. * - * @param system - The physics system this Body belongs to. - * @param sprite - The Sprite object this physics body belongs to. - * @param type - The type of Ninja shape to create. 1 = AABB, 2 = Circle or 3 = Tile. - Default: 1 - * @param id - If this body is using a Tile shape, you can set the Tile id here, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc. - Default: 1 - * @param radius - If this body is using a Circle shape this controls the radius. - Default: 16 - * @param x - The x coordinate of this Body. This is only used if a sprite is not provided. - Default: 0 - * @param y - The y coordinate of this Body. This is only used if a sprite is not provided. - Default: 0 - * @param width - The width of this Body. This is only used if a sprite is not provided. - Default: 0 - * @param height - The height of this Body. This is only used if a sprite is not provided. - Default: 0 + * @param system The physics system this Body belongs to. + * @param sprite The Sprite object this physics body belongs to. + * @param type The type of Ninja shape to create. 1 = AABB, 2 = Circle or 3 = Tile. - Default: 1 + * @param id If this body is using a Tile shape, you can set the Tile id here, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc. - Default: 1 + * @param radius If this body is using a Circle shape this controls the radius. - Default: 16 + * @param x The x coordinate of this Body. This is only used if a sprite is not provided. - Default: 0 + * @param y The y coordinate of this Body. This is only used if a sprite is not provided. - Default: 0 + * @param width The width of this Body. This is only used if a sprite is not provided. - Default: 0 + * @param height The height of this Body. This is only used if a sprite is not provided. - Default: 0 */ constructor(system: Phaser.Physics.Ninja, sprite: Phaser.Sprite, type?: number, id?: number, radius?: number, x?: number, y?: number, width?: number, height?: number); @@ -12984,25 +12984,25 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Returns the absolute delta x value. - * @return - The absolute delta value. + * @return The absolute delta value. */ deltaAbsX(): number; /** * Returns the absolute delta y value. - * @return - The absolute delta value. + * @return The absolute delta value. */ deltaAbsY(): number; /** * Returns the delta x value. The difference between Body.x now and in the previous step. - * @return - The delta value. Positive if the motion was to the right, negative if to the left. + * @return The delta value. Positive if the motion was to the right, negative if to the left. */ deltaX(): number; /** * Returns the delta y value. The difference between Body.y now and in the previous step. - * @return - The delta value. Positive if the motion was downwards, negative if upwards. + * @return The delta value. Positive if the motion was downwards, negative if upwards. */ deltaY(): number; @@ -13031,10 +13031,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Render Sprite's Body. * - * @param context - The context to render to. - * @param body - The Body to render. - * @param color - color of the debug shape to be rendered. (format is css color string). - Default: 'rgba(0,255,0,0.4)' - * @param filled - Render the shape as a filled (default, true) or a stroked (false) - Default: true + * @param context The context to render to. + * @param body The Body to render. + * @param color color of the debug shape to be rendered. (format is css color string). - Default: 'rgba(0,255,0,0.4)' + * @param filled Render the shape as a filled (default, true) or a stroked (false) - Default: true */ render(context: any, body: Phaser.Physics.Ninja.Body, color?: string, filled?: boolean): void; @@ -13057,11 +13057,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Ninja Physics AABB constructor. * Note: This class could be massively optimised and reduced in size. I leave that challenge up to you. * - * @param body - The body that owns this shape. - * @param x - The x coordinate to create this shape at. - * @param y - The y coordinate to create this shape at. - * @param width - The width of this AABB. - * @param height - The height of this AABB. + * @param body The body that owns this shape. + * @param x The x coordinate to create this shape at. + * @param y The y coordinate to create this shape at. + * @param width The width of this AABB. + * @param height The height of this AABB. */ constructor(body: Phaser.Physics.Ninja.Body, x: number, y: number, width: number, height: number); @@ -13125,14 +13125,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Collides this AABB against a AABB. * - * @param aabb - The AABB to collide against. + * @param aabb The AABB to collide against. */ collideAABBVsAABB(aabb: Phaser.Physics.Ninja.AABB): boolean; /** * Collides this AABB against a Tile. * - * @param tile - The Tile to collide against. + * @param tile The Tile to collide against. */ collideAABBVsTile(tile: Phaser.Physics.Ninja.Tile): boolean; @@ -13149,44 +13149,44 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Render this AABB for debugging purposes. * - * @param context - The context to render to. - * @param xOffset - X offset from AABB's position to render at. - * @param yOffset - Y offset from AABB's position to render at. - * @param color - color of the debug shape to be rendered. (format is css color string). - * @param filled - Render the shape as solid (true) or hollow (false). + * @param context The context to render to. + * @param xOffset X offset from AABB's position to render at. + * @param yOffset Y offset from AABB's position to render at. + * @param color color of the debug shape to be rendered. (format is css color string). + * @param filled Render the shape as solid (true) or hollow (false). */ render(context: any, xOffset: number, yOffset: number, color: string, filled: boolean): void; /** * Process a world collision and apply the resulting forces. * - * @param px - The tangent velocity - * @param py - The tangent velocity - * @param dx - Collision normal - * @param dy - Collision normal - * @param obj - Object this AABB collided with + * @param px The tangent velocity + * @param py The tangent velocity + * @param dx Collision normal + * @param dy Collision normal + * @param obj Object this AABB collided with */ reportCollisionVsWorld(px: number, py: number, dx: number, dy: number, obj: any): void; /** * Process a body collision and apply the resulting forces. Still very much WIP and doesn't work fully. Feel free to fix! * - * @param px - The tangent velocity - * @param py - The tangent velocity - * @param dx - Collision normal - * @param dy - Collision normal - * @param obj - Object this AABB collided with + * @param px The tangent velocity + * @param py The tangent velocity + * @param dx Collision normal + * @param dy Collision normal + * @param obj Object this AABB collided with */ reportCollisionVsBody(px: number, py: number, dx: number, dy: number, obj: any): void; /** * Resolves tile collision. * - * @param x - Penetration depth on the x axis. - * @param y - Penetration depth on the y axis. - * @param body - The AABB involved in the collision. - * @param tile - The Tile involved in the collision. - * @return - True if the collision was processed, otherwise false. + * @param x Penetration depth on the x axis. + * @param y Penetration depth on the y axis. + * @param body The AABB involved in the collision. + * @param tile The Tile involved in the collision. + * @return True if the collision was processed, otherwise false. */ resolveTile(x: number, y: number, body: Phaser.Physics.Ninja.AABB, tile: Phaser.Physics.Ninja.Tile): boolean; reverse(): void; @@ -13205,10 +13205,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Ninja Physics Circle constructor. * Note: This class could be massively optimised and reduced in size. I leave that challenge up to you. * - * @param body - The body that owns this shape. - * @param x - The x coordinate to create this shape at. - * @param y - The y coordinate to create this shape at. - * @param radius - The radius of this Circle. + * @param body The body that owns this shape. + * @param x The x coordinate to create this shape at. + * @param y The y coordinate to create this shape at. + * @param radius The radius of this Circle. */ constructor(body: Phaser.Physics.Ninja.Body, x: number, y: number, radius: number); @@ -13272,8 +13272,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Collides this Circle with a Tile. * - * @param t - The Tile involved in the collision. - * @return - True if they collide, otherwise false. + * @param t The Tile involved in the collision. + * @return True if they collide, otherwise false. */ collideCircleVsTile(tile: Phaser.Physics.Ninja.Tile): boolean; @@ -13296,22 +13296,22 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Render this circle for debugging purposes. * - * @param context - The context to render to. - * @param xOffset - X offset from circle's position to render at. - * @param yOffset - Y offset from circle's position to render at. - * @param color - color of the debug shape to be rendered. (format is css color string). - * @param filled - Render the shape as solid (true) or hollow (false). + * @param context The context to render to. + * @param xOffset X offset from circle's position to render at. + * @param yOffset Y offset from circle's position to render at. + * @param color color of the debug shape to be rendered. (format is css color string). + * @param filled Render the shape as solid (true) or hollow (false). */ render(context: any, xOffset: number, yOffset: number, color: string, filled: boolean): void; /** * Process a world collision and apply the resulting forces. * - * @param px - The tangent velocity - * @param py - The tangent velocity - * @param dx - Collision normal - * @param dy - Collision normal - * @param obj - Object this Circle collided with + * @param px The tangent velocity + * @param py The tangent velocity + * @param dx Collision normal + * @param dy Collision normal + * @param obj Object this Circle collided with */ reportCollisionVsWorld(px: number, py: number, dx: number, dy: number, obj: any): void; reportCollisionVsBody(px: number, py: number, dx: number, dy: number, obj: any): void; @@ -13319,13 +13319,13 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Resolves tile collision. * - * @param x - Penetration depth on the x axis. - * @param y - Penetration depth on the y axis. - * @param oH - Grid / voronoi region. - * @param oV - Grid / voronoi region. - * @param obj - The Circle involved in the collision. - * @param t - The Tile involved in the collision. - * @return - The result of the collision. + * @param x Penetration depth on the x axis. + * @param y Penetration depth on the y axis. + * @param oH Grid / voronoi region. + * @param oV Grid / voronoi region. + * @param obj The Circle involved in the collision. + * @param t The Tile involved in the collision. + * @return The result of the collision. */ resolveCircleTile(x: number, y: number, oH: number, oV: number, obj: Phaser.Physics.Ninja.Circle, t: Phaser.Physics.Ninja.Tile): boolean; @@ -13351,12 +13351,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Note: This class could be massively optimised and reduced in size. I leave that challenge up to you. * - * @param body - The body that owns this shape. - * @param x - The x coordinate to create this shape at. - * @param y - The y coordinate to create this shape at. - * @param width - The width of this AABB. - * @param height - The height of this AABB. - * @param type - The type of Ninja shape to create. 1 = AABB, 2 = Circle or 3 = Tile. - Default: 1 + * @param body The body that owns this shape. + * @param x The x coordinate to create this shape at. + * @param y The y coordinate to create this shape at. + * @param width The width of this AABB. + * @param height The height of this AABB. + * @param type The type of Ninja shape to create. 1 = AABB, 2 = Circle or 3 = Tile. - Default: 1 */ constructor(body: Phaser.Physics.Ninja.Body, x: number, y: number, width: number, height: number, type?: number); @@ -13460,18 +13460,18 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Process a world collision and apply the resulting forces. * - * @param px - The tangent velocity - * @param py - The tangent velocity - * @param dx - Collision normal - * @param dy - Collision normal - * @param obj - Object this Tile collided with + * @param px The tangent velocity + * @param py The tangent velocity + * @param dx Collision normal + * @param dy Collision normal + * @param obj Object this Tile collided with */ reportCollisionVsWorld(px: number, py: number, dx: number, dy: number, obj: any): void; /** * Tiles cannot collide with the world bounds, it's up to you to keep them where you want them. But we need this API stub to satisfy the Body. * - * @param id - The type of Tile this will use, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc. + * @param id The type of Tile this will use, i.e. Phaser.Physics.Ninja.Tile.SLOPE_45DEGpn, Phaser.Physics.Ninja.Tile.CONVEXpp, etc. */ setType(id: number): number; @@ -13491,8 +13491,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * This is your main access to the P2 Physics World. * From here you can create materials, listen for events and add bodies into the physics simulation. * - * @param game - Reference to the current game instance. - * @param config - Physics configuration object passed in from the game constructor. + * @param game Reference to the current game instance. + * @param config Physics configuration object passed in from the game constructor. */ constructor(game: Phaser.Game, config?: any); @@ -13684,39 +13684,39 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Add a body to the world. * - * @param body - The Body to add to the World. - * @return - True if the Body was added successfully, otherwise false. + * @param body The Body to add to the World. + * @return True if the Body was added successfully, otherwise false. */ addBody(body: Phaser.Physics.P2.Body): boolean; /** * Adds a Contact Material to the world. * - * @param material - The Contact Material to be added to the World. - * @return - The Contact Material that was added. + * @param material The Contact Material to be added to the World. + * @return The Contact Material that was added. */ addContactMaterial(material: Phaser.Physics.P2.ContactMaterial): Phaser.Physics.P2.ContactMaterial; /** * Adds a Constraint to the world. * - * @param constraint - The Constraint to add to the World. - * @return - The Constraint that was added. + * @param constraint The Constraint to add to the World. + * @return The Constraint that was added. */ addConstraint(constraint: T): T; /** * Adds a Spring to the world. * - * @param spring - The Spring to add to the World. - * @return - The Spring that was added. + * @param spring The Spring to add to the World. + * @return The Spring that was added. */ addSpring(spring: Phaser.Physics.P2.Spring): Phaser.Physics.P2.Spring; /** * Handles a p2 begin contact event. * - * @param event - The event data. + * @param event The event data. */ beginContactHandler(event: any): void; @@ -13738,8 +13738,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Clears all physics bodies from the given TilemapLayer that were created with `World.convertTilemap`. * - * @param map - The Tilemap to get the map data from. - * @param layer - The layer to operate on. If not given will default to map.currentLayer. + * @param map The Tilemap to get the map data from. + * @param layer The layer to operate on. If not given will default to map.currentLayer. */ clearTilemapLayerBodies(map: Phaser.Tilemap, layer?: any): void; @@ -13747,10 +13747,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Converts all of the polylines objects inside a Tiled ObjectGroup into physics bodies that are added to the world. * Note that the polylines must be created in such a way that they can withstand polygon decomposition. * - * @param map - The Tilemap to get the map data from. - * @param layer - The layer to operate on. If not given will default to map.currentLayer. - * @param addToWorld - If true it will automatically add each body to the world. - Default: true - * @return - An array of the Phaser.Physics.Body objects that have been created. + * @param map The Tilemap to get the map data from. + * @param layer The layer to operate on. If not given will default to map.currentLayer. + * @param addToWorld If true it will automatically add each body to the world. - Default: true + * @return An array of the Phaser.Physics.Body objects that have been created. */ convertCollisionObjects(map: Phaser.Tilemap, layer?: any, addToWorld?: boolean): Phaser.Physics.P2.Body[]; @@ -13760,47 +13760,47 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Every time you call this method it will destroy any previously created bodies and remove them from the world. * Therefore understand it's a very expensive operation and not to be done in a core game update loop. * - * @param map - The Tilemap to get the map data from. - * @param layer - The layer to operate on. If not given will default to map.currentLayer. - * @param addToWorld - If true it will automatically add each body to the world, otherwise it's up to you to do so. - Default: true - * @param optimize - If true adjacent colliding tiles will be combined into a single body to save processing. However it means you cannot perform specific Tile to Body collision responses. - Default: true - * @return - An array of the Phaser.Physics.P2.Body objects that were created. + * @param map The Tilemap to get the map data from. + * @param layer The layer to operate on. If not given will default to map.currentLayer. + * @param addToWorld If true it will automatically add each body to the world, otherwise it's up to you to do so. - Default: true + * @param optimize If true adjacent colliding tiles will be combined into a single body to save processing. However it means you cannot perform specific Tile to Body collision responses. - Default: true + * @return An array of the Phaser.Physics.P2.Body objects that were created. */ convertTilemap(map: Phaser.Tilemap, layer?: any, addToWorld?: Boolean, optimize?: boolean): Phaser.Physics.P2.Body[]; /** * Creates a new Body and adds it to the World. * - * @param x - The x coordinate of Body. - * @param y - The y coordinate of Body. - * @param mass - The mass of the Body. A mass of 0 means a 'static' Body is created. - * @param addToWorld - Automatically add this Body to the world? (usually false as it won't have any shapes on construction). - Default: false - * @param options - An object containing the build options: - * @param options.optimalDecomp - Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices. - Default: false - * @param options.skipSimpleCheck - Set to true if you already know that the path is not intersecting itself. - Default: false - * @param options.removeCollinearPoints - Set to a number (angle threshold value) to remove collinear points, or false to keep all points. - Default: false - * @param points - An array of 2d vectors that form the convex or concave polygon. - Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...], - or the arguments passed can be flat x,y values e.g. `setPolygon(options, x,y, x,y, x,y, ...)` where `x` and `y` are numbers. - * @return - The body + * @param x The x coordinate of Body. + * @param y The y coordinate of Body. + * @param mass The mass of the Body. A mass of 0 means a 'static' Body is created. + * @param addToWorld Automatically add this Body to the world? (usually false as it won't have any shapes on construction). - Default: false + * @param options An object containing the build options: + * @param options.optimalDecomp Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices. - Default: false + * @param options.skipSimpleCheck Set to true if you already know that the path is not intersecting itself. - Default: false + * @param options.removeCollinearPoints Set to a number (angle threshold value) to remove collinear points, or false to keep all points. - Default: false + * @param points An array of 2d vectors that form the convex or concave polygon. + * Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...], + * or the arguments passed can be flat x,y values e.g. `setPolygon(options, x,y, x,y, x,y, ...)` where `x` and `y` are numbers. + * @return The body */ createBody(x: number, y: number, mass: number, addToWorld?: boolean, options?: p2.BodyOptions, data?: number[][]): Phaser.Physics.P2.Body; /** * Creates a new Body and adds it to the World. * - * @param x - The x coordinate of Body. - * @param y - The y coordinate of Body. - * @param mass - The mass of the Body. A mass of 0 means a 'static' Body is created. - * @param addToWorld - Automatically add this Body to the world? (usually false as it won't have any shapes on construction). - Default: false - * @param options - An object containing the build options: - * @param options.optimalDecomp - Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices. - Default: false - * @param options.skipSimpleCheck - Set to true if you already know that the path is not intersecting itself. - Default: false - * @param options.removeCollinearPoints - Set to a number (angle threshold value) to remove collinear points, or false to keep all points. - Default: false - * @param points - An array of 2d vectors that form the convex or concave polygon. - Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...], - or the arguments passed can be flat x,y values e.g. `setPolygon(options, x,y, x,y, x,y, ...)` where `x` and `y` are numbers. - * @return - The body + * @param x The x coordinate of Body. + * @param y The y coordinate of Body. + * @param mass The mass of the Body. A mass of 0 means a 'static' Body is created. + * @param addToWorld Automatically add this Body to the world? (usually false as it won't have any shapes on construction). - Default: false + * @param options An object containing the build options: + * @param options.optimalDecomp Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices. - Default: false + * @param options.skipSimpleCheck Set to true if you already know that the path is not intersecting itself. - Default: false + * @param options.removeCollinearPoints Set to a number (angle threshold value) to remove collinear points, or false to keep all points. - Default: false + * @param points An array of 2d vectors that form the convex or concave polygon. + * Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...], + * or the arguments passed can be flat x,y values e.g. `setPolygon(options, x,y, x,y, x,y, ...)` where `x` and `y` are numbers. + * @return The body */ createBody(x: number, y: number, mass: number, addToWorld?: boolean, options?: p2.BodyOptions, data?: number[]): Phaser.Physics.P2.Body; @@ -13808,7 +13808,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Creates a new Collision Group and optionally applies it to the given object. * Collision Groups are handled using bitmasks, therefore you have a fixed limit you can create before you need to re-use older groups. * - * @param object - An optional Sprite or Group to apply the Collision Group to. If a Group is given it will be applied to all top-level children. + * @param object An optional Sprite or Group to apply the Collision Group to. If a Group is given it will be applied to all top-level children. */ createCollisionGroup(group?: Phaser.Group): Phaser.Physics.P2.CollisionGroup; @@ -13816,53 +13816,53 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Creates a new Collision Group and optionally applies it to the given object. * Collision Groups are handled using bitmasks, therefore you have a fixed limit you can create before you need to re-use older groups. * - * @param object - An optional Sprite or Group to apply the Collision Group to. If a Group is given it will be applied to all top-level children. + * @param object An optional Sprite or Group to apply the Collision Group to. If a Group is given it will be applied to all top-level children. */ createCollisionGroup(group?: Phaser.Sprite): Phaser.Physics.P2.CollisionGroup; /** * Creates a Contact Material from the two given Materials. You can then edit the properties of the Contact Material directly. * - * @param materialA - The first Material to create the ContactMaterial from. If undefined it will create a new Material object first. - * @param materialB - The second Material to create the ContactMaterial from. If undefined it will create a new Material object first. - * @param options - Material options object. - * @return - The Contact Material that was created. + * @param materialA The first Material to create the ContactMaterial from. If undefined it will create a new Material object first. + * @param materialB The second Material to create the ContactMaterial from. If undefined it will create a new Material object first. + * @param options Material options object. + * @return The Contact Material that was created. */ createContactMaterial(materialA: Phaser.Physics.P2.Material, materialB: Phaser.Physics.P2.Material, options?: p2.ContactMaterialOptions): Phaser.Physics.P2.ContactMaterial; /** * Creates a constraint that tries to keep the distance between two bodies constant. * - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param distance - The distance to keep between the bodies. - * @param localAnchorA - The anchor point for bodyA, defined locally in bodyA frame. Defaults to [0,0]. - * @param localAnchorB - The anchor point for bodyB, defined locally in bodyB frame. Defaults to [0,0]. - * @param maxForce - The maximum force that should be applied to constrain the bodies. - * @return - The constraint + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param distance The distance to keep between the bodies. + * @param localAnchorA The anchor point for bodyA, defined locally in bodyA frame. Defaults to [0,0]. + * @param localAnchorB The anchor point for bodyB, defined locally in bodyB frame. Defaults to [0,0]. + * @param maxForce The maximum force that should be applied to constrain the bodies. + * @return The constraint */ createDistanceConstraint(bodyA: any, bodyB: any, distance: number, localAnchorA?: number[], localAnchorB?: number[], maxForce?: number): Phaser.Physics.P2.DistanceConstraint; /** * Creates a constraint that tries to keep the distance between two bodies constant. * - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param angle - The relative angle - Default: 0 - * @param ratio - The gear ratio. - Default: 1 - * @return - The constraint + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param angle The relative angle - Default: 0 + * @param ratio The gear ratio. - Default: 1 + * @return The constraint */ createGearConstraint(bodyA: any, bodyB: any, angle?: number, ratio?: number): Phaser.Physics.P2.GearConstraint; /** * Locks the relative position between two bodies. * - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param offset - The offset of bodyB in bodyA's frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param angle - The angle of bodyB in bodyA's frame. - Default: 0 - * @param maxForce - The maximum force that should be applied to constrain the bodies. - * @return - The constraint + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param offset The offset of bodyB in bodyA's frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param angle The angle of bodyB in bodyA's frame. - Default: 0 + * @param maxForce The maximum force that should be applied to constrain the bodies. + * @return The constraint */ createLockConstraint(bodyA: any, bodyB: any, offset?: number[], angle?: number, maxForce?: number): Phaser.Physics.P2.LockConstraint; @@ -13871,43 +13871,43 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Materials are a way to control what happens when Shapes collide. Combine unique Materials together to create Contact Materials. * Contact Materials have properties such as friction and restitution that allow for fine-grained collision control between different Materials. * - * @param name - Optional name of the Material. Each Material has a unique ID but string names are handy for debugging. - * @param body - Optional Body. If given it will assign the newly created Material to the Body shapes. - * @return - The Material that was created. This is also stored in Phaser.Physics.P2.materials. + * @param name Optional name of the Material. Each Material has a unique ID but string names are handy for debugging. + * @param body Optional Body. If given it will assign the newly created Material to the Body shapes. + * @return The Material that was created. This is also stored in Phaser.Physics.P2.materials. */ createMaterial(name?: string, body?: Phaser.Physics.P2.Body): Phaser.Physics.P2.Material; /** * Creates a new Particle and adds it to the World. * - * @param x - The x coordinate of Body. - * @param y - The y coordinate of Body. - * @param mass - The mass of the Body. A mass of 0 means a 'static' Body is created. - * @param addToWorld - Automatically add this Body to the world? (usually false as it won't have any shapes on construction). - Default: false - * @param options - An object containing the build options: - * @param options.optimalDecomp - Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices. - Default: false - * @param options.skipSimpleCheck - Set to true if you already know that the path is not intersecting itself. - Default: false - * @param options.removeCollinearPoints - Set to a number (angle threshold value) to remove collinear points, or false to keep all points. - Default: false - * @param points - An array of 2d vectors that form the convex or concave polygon. - Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...], - or the arguments passed can be flat x,y values e.g. `setPolygon(options, x,y, x,y, x,y, ...)` where `x` and `y` are numbers. + * @param x The x coordinate of Body. + * @param y The y coordinate of Body. + * @param mass The mass of the Body. A mass of 0 means a 'static' Body is created. + * @param addToWorld Automatically add this Body to the world? (usually false as it won't have any shapes on construction). - Default: false + * @param options An object containing the build options: + * @param options.optimalDecomp Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices. - Default: false + * @param options.skipSimpleCheck Set to true if you already know that the path is not intersecting itself. - Default: false + * @param options.removeCollinearPoints Set to a number (angle threshold value) to remove collinear points, or false to keep all points. - Default: false + * @param points An array of 2d vectors that form the convex or concave polygon. + * Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...], + * or the arguments passed can be flat x,y values e.g. `setPolygon(options, x,y, x,y, x,y, ...)` where `x` and `y` are numbers. */ createParticle(x: number, y: number, mass: number, addToWorld?: boolean, options?: p2.BodyOptions, data?: number[][]): Phaser.Physics.P2.Body; /** * Creates a new Particle and adds it to the World. * - * @param x - The x coordinate of Body. - * @param y - The y coordinate of Body. - * @param mass - The mass of the Body. A mass of 0 means a 'static' Body is created. - * @param addToWorld - Automatically add this Body to the world? (usually false as it won't have any shapes on construction). - Default: false - * @param options - An object containing the build options: - * @param options.optimalDecomp - Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices. - Default: false - * @param options.skipSimpleCheck - Set to true if you already know that the path is not intersecting itself. - Default: false - * @param options.removeCollinearPoints - Set to a number (angle threshold value) to remove collinear points, or false to keep all points. - Default: false - * @param points - An array of 2d vectors that form the convex or concave polygon. - Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...], - or the arguments passed can be flat x,y values e.g. `setPolygon(options, x,y, x,y, x,y, ...)` where `x` and `y` are numbers. + * @param x The x coordinate of Body. + * @param y The y coordinate of Body. + * @param mass The mass of the Body. A mass of 0 means a 'static' Body is created. + * @param addToWorld Automatically add this Body to the world? (usually false as it won't have any shapes on construction). - Default: false + * @param options An object containing the build options: + * @param options.optimalDecomp Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices. - Default: false + * @param options.skipSimpleCheck Set to true if you already know that the path is not intersecting itself. - Default: false + * @param options.removeCollinearPoints Set to a number (angle threshold value) to remove collinear points, or false to keep all points. - Default: false + * @param points An array of 2d vectors that form the convex or concave polygon. + * Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...], + * or the arguments passed can be flat x,y values e.g. `setPolygon(options, x,y, x,y, x,y, ...)` where `x` and `y` are numbers. */ createParticle(x: number, y: number, mass: number, addToWorld?: boolean, options?: p2.BodyOptions, data?: number[]): Phaser.Physics.P2.Body; @@ -13915,14 +13915,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Constraint that only allows bodies to move along a line, relative to each other. * See http://www.iforce2d.net/b2dtut/joints-prismatic * - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param lockRotation - If set to false, bodyB will be free to rotate around its anchor point. - Default: true - * @param anchorA - Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param anchorB - Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param axis - An axis, defined in body A frame, that body B's anchor point may slide along. The value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param maxForce - The maximum force that should be applied to constrain the bodies. - * @return - The constraint + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param lockRotation If set to false, bodyB will be free to rotate around its anchor point. - Default: true + * @param anchorA Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param anchorB Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param axis An axis, defined in body A frame, that body B's anchor point may slide along. The value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param maxForce The maximum force that should be applied to constrain the bodies. + * @return The constraint */ createPrismaticConstraint(body: any, bodyB: any, lockRotation?: boolean, anchorA?: number[], anchorB?: number[], axis?: Float32Array, maxForce?: number): Phaser.Physics.P2.PrismaticConstraint; @@ -13930,41 +13930,41 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Connects two bodies at given offset points, letting them rotate relative to each other around this point. * The pivot points are given in world (pixel) coordinates. * - * @param bodyA - First connected body. - * @param pivotA - The point relative to the center of mass of bodyA which bodyA is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param bodyB - Second connected body. - * @param pivotB - The point relative to the center of mass of bodyB which bodyB is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param maxForce - The maximum force that should be applied to constrain the bodies. - Default: 0 - * @param worldPivot - A pivot point given in world coordinates. If specified, localPivotA and localPivotB are automatically computed from this value. - Default: null - * @return - The constraint + * @param bodyA First connected body. + * @param pivotA The point relative to the center of mass of bodyA which bodyA is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param bodyB Second connected body. + * @param pivotB The point relative to the center of mass of bodyB which bodyB is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param maxForce The maximum force that should be applied to constrain the bodies. - Default: 0 + * @param worldPivot A pivot point given in world coordinates. If specified, localPivotA and localPivotB are automatically computed from this value. - Default: null + * @return The constraint */ createRevoluteConstraint(bodyA: any, pivotA: number[], bodyB: any, pivotB: number[], maxForce?: number, worldPivot?: number[]): Phaser.Physics.P2.RevoluteContraint; /** * Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping. * - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param restAngle - The relative angle of bodies at which the spring is at rest. If not given, it's set to the current relative angle between the bodies. - * @param stiffness - Stiffness of the spring. A number >= 0. - Default: 100 - * @param damping - Damping of the spring. A number >= 0. - Default: 1 - * @return - The spring + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param restAngle The relative angle of bodies at which the spring is at rest. If not given, it's set to the current relative angle between the bodies. + * @param stiffness Stiffness of the spring. A number >= 0. - Default: 100 + * @param damping Damping of the spring. A number >= 0. - Default: 1 + * @return The spring */ createRotationalSpring(bodyA: any, bodyB: any, restAngle?: number, stiffness?: number, damping?: number): p2.RotationalSpring; /** * Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping. * - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param restLength - Rest length of the spring. A number > 0. - Default: 1 - * @param stiffness - Stiffness of the spring. A number >= 0. - Default: 100 - * @param damping - Damping of the spring. A number >= 0. - Default: 1 - * @param worldA - Where to hook the spring to body A in world coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32]. - * @param worldB - Where to hook the spring to body B in world coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32]. - * @param localA - Where to hook the spring to body A in local body coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32]. - * @param localB - Where to hook the spring to body B in local body coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32]. - * @return - The spring + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param restLength Rest length of the spring. A number > 0. - Default: 1 + * @param stiffness Stiffness of the spring. A number >= 0. - Default: 100 + * @param damping Damping of the spring. A number >= 0. - Default: 1 + * @param worldA Where to hook the spring to body A in world coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32]. + * @param worldB Where to hook the spring to body B in world coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32]. + * @param localA Where to hook the spring to body A in local body coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32]. + * @param localB Where to hook the spring to body B in local body coordinates. This value is an array by 2 elements, x and y, i.e: [32, 32]. + * @return The spring */ createSpring(bodyA: any, bodyB: any, restLength?: number, stiffness?: number, damping?: number, worldA?: number[], worldB?: number[], localA?: number[], localB?: number[]): Phaser.Physics.P2.Spring; @@ -13978,9 +13978,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * A game object can only have 1 physics body active at any one time, and it can't be changed until the object is destroyed. * Note: When the game object is enabled for P2 physics it has its anchor x/y set to 0.5 so it becomes centered. * - * @param object - The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. - * @param debug - Create a debug object to go with this body? - Default: false - * @param children - Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. - Default: true + * @param object The game object to create the physics body on. Can also be an array or Group of objects, a body will be created on every child that has a `body` property. + * @param debug Create a debug object to go with this body? - Default: false + * @param children Should a body be created on all children of this object? If true it will recurse down the display list as far as it can go. - Default: true */ enable(object: any, debug?: boolean, children?: boolean): void; @@ -13988,50 +13988,50 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Creates a P2 Physics body on the given game object. * A game object can only have 1 physics body active at any one time, and it can't be changed until the body is nulled. * - * @param object - The game object to create the physics body on. A body will only be created if this object has a null `body` property. - * @param debug - Create a debug object to go with this body? + * @param object The game object to create the physics body on. A body will only be created if this object has a null `body` property. + * @param debug Create a debug object to go with this body? */ enableBody(object: any, debug: boolean): void; /** * Handles a p2 end contact event. * - * @param event - The event data. + * @param event The event data. */ endContactHandler(event: any): void; /** * Populates and returns an array with references to of all current Bodies in the world. - * @return - An array containing all current Bodies in the world. + * @return An array containing all current Bodies in the world. */ getBodies(): Phaser.Physics.P2.Body[]; /** * Checks the given object to see if it has a p2.Body and if so returns it. * - * @param object - The object to check for a p2.Body on. - * @return - The p2.Body, or null if not found. + * @param object The object to check for a p2.Body on. + * @return The p2.Body, or null if not found. */ getBody(object: any): Phaser.Physics.P2.Body; /** * Populates and returns an array of all current Constraints in the world. - * @return - An array containing all current Constraints in the world. + * @return An array containing all current Constraints in the world. */ getConstraints(): p2.Constraint[]; /** * Populates and returns an array of all current Springs in the world. - * @return - An array containing all current Springs in the world. + * @return An array containing all current Springs in the world. */ getSprings(): Phaser.Physics.P2.Spring[]; /** * Gets a Contact Material based on the two given Materials. * - * @param materialA - The first Material to search for. - * @param materialB - The second Material to search for. - * @return - The Contact Material or false if none was found matching the Materials given. + * @param materialA The first Material to search for. + * @param materialB The second Material to search for. + * @return The Contact Material or false if none was found matching the Materials given. */ getContactMaterial(materialA: Phaser.Physics.P2.Material, materialB: Phaser.Physics.P2.Material): Phaser.Physics.P2.ContactMaterial; @@ -14039,11 +14039,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Test if a world point overlaps bodies. You will get an array of actual P2 bodies back. You can find out which Sprite a Body belongs to * (if any) by checking the Body.parent.sprite property. Body.parent is a Phaser.Physics.P2.Body property. * - * @param worldPoint - Point to use for intersection tests. The points values must be in world (pixel) coordinates. - * @param bodies - A list of objects to check for intersection. If not given it will check Phaser.Physics.P2.world.bodies (i.e. all world bodies) - * @param precision - Used for matching against particles and lines. Adds some margin to these infinitesimal objects. - Default: 5 - * @param filterStatic - If true all Static objects will be removed from the results array. - Default: false - * @return - Array of bodies that overlap the point. + * @param worldPoint Point to use for intersection tests. The points values must be in world (pixel) coordinates. + * @param bodies A list of objects to check for intersection. If not given it will check Phaser.Physics.P2.world.bodies (i.e. all world bodies) + * @param precision Used for matching against particles and lines. Adds some margin to these infinitesimal objects. - Default: 5 + * @param filterStatic If true all Static objects will be removed from the results array. - Default: false + * @return Array of bodies that overlap the point. */ hitTest(worldPoint: Phaser.Point, bodies?: any[], precision?: number, filterStatic?: boolean): Phaser.Physics.P2.Body[]; @@ -14052,8 +14052,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * By default Phaser uses a scale of 20px per meter. * If you need to modify this you can over-ride these functions via the Physics Configuration object. * - * @param v - The value to convert. - * @return - The scaled value. + * @param v The value to convert. + * @return The scaled value. */ mpx(v: number): number; @@ -14062,8 +14062,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * By default Phaser uses a scale of 20px per meter. * If you need to modify this you can over-ride these functions via the Physics Configuration object. * - * @param v - The value to convert. - * @return - The scaled value. + * @param v The value to convert. + * @return The scaled value. */ mpxi(v: number): number; @@ -14082,8 +14082,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * By default Phaser uses a scale of 20px per meter. * If you need to modify this you can over-ride these functions via the Physics Configuration object. * - * @param v - The value to convert. - * @return - The scaled value. + * @param v The value to convert. + * @return The scaled value. */ pxm(v: number): number; @@ -14092,47 +14092,47 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * By default Phaser uses a scale of 20px per meter. * If you need to modify this you can over-ride these functions via the Physics Configuration object. * - * @param v - The value to convert. - * @return - The scaled value. + * @param v The value to convert. + * @return The scaled value. */ pxmi(v: number): number; /** * Removes a body from the world. This will silently fail if the body wasn't part of the world to begin with. * - * @param body - The Body to remove from the World. - * @return - The Body that was removed. + * @param body The Body to remove from the World. + * @return The Body that was removed. */ removeBody(body: Phaser.Physics.P2.Body): Phaser.Physics.P2.Body; /** * This will add a P2 Physics body into the removal list for the next step. * - * @param body - The body to remove at the start of the next step. + * @param body The body to remove at the start of the next step. */ removeBodyNextStep(body: Phaser.Physics.P2.Body): void; /** * Removes a Constraint from the world. * - * @param constraint - The Constraint to be removed from the World. - * @return - The Constraint that was removed. + * @param constraint The Constraint to be removed from the World. + * @return The Constraint that was removed. */ removeConstraint(constraint: T): T; /** * Removes a Contact Material from the world. * - * @param material - The Contact Material to be removed from the World. - * @return - The Contact Material that was removed. + * @param material The Contact Material to be removed from the World. + * @return The Contact Material that was removed. */ removeContactMaterial(material: Phaser.Physics.P2.ContactMaterial): Phaser.Physics.P2.ContactMaterial; /** * Removes a Spring from the world. * - * @param spring - The Spring to remove from the World. - * @return - The Spring that was removed. + * @param spring The Spring to remove from the World. + * @return The Spring that was removed. */ removeSpring(spring: Phaser.Physics.P2.Spring): Phaser.Physics.P2.Spring; @@ -14151,15 +14151,15 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Sets the bounds of the Physics world to match the given world pixel dimensions. * You can optionally set which 'walls' to create: left, right, top or bottom. * - * @param x - The x coordinate of the top-left corner of the bounds. - * @param y - The y coordinate of the top-left corner of the bounds. - * @param width - The width of the bounds. - * @param height - The height of the bounds. - * @param left - If true will create the left bounds wall. - Default: true - * @param right - If true will create the right bounds wall. - Default: true - * @param top - If true will create the top bounds wall. - Default: true - * @param bottom - If true will create the bottom bounds wall. - Default: true - * @param setCollisionGroup - If true the Bounds will be set to use its own Collision Group. - Default: true + * @param x The x coordinate of the top-left corner of the bounds. + * @param y The y coordinate of the top-left corner of the bounds. + * @param width The width of the bounds. + * @param height The height of the bounds. + * @param left If true will create the left bounds wall. - Default: true + * @param right If true will create the right bounds wall. - Default: true + * @param top If true will create the top bounds wall. - Default: true + * @param bottom If true will create the bottom bounds wall. - Default: true + * @param setCollisionGroup If true the Bounds will be set to use its own Collision Group. - Default: true */ setBounds(x: number, y: number, width: number, height: number, left?: Boolean, right?: boolean, top?: boolean, bottom?: boolean, setCollisionGroup?: boolean): void; setBoundsToWorld(left?: boolean, right?: boolean, top?: boolean, bottom?: boolean, setCollisionGroup?: boolean): void; @@ -14169,15 +14169,15 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Impact event handling is disabled by default. Enable it before any impact events will be dispatched. * In a busy world hundreds of impact events can be generated every step, so only enable this if you cannot do what you need via beginContact or collision masks. * - * @param state - Set to true to enable impact events, or false to disable. + * @param state Set to true to enable impact events, or false to disable. */ setImpactEvents(state: boolean): void; /** * Sets the given Material against all Shapes owned by all the Bodies in the given array. * - * @param material - The Material to be applied to the given Bodies. - * @param bodies - An Array of Body objects that the given Material will be set on. + * @param material The Material to be applied to the given Bodies. + * @param bodies An Array of Body objects that the given Material will be set on. */ setMaterial(material: Phaser.Physics.P2.Material, bodies?: Phaser.Physics.P2.Body[]): void; @@ -14187,15 +14187,15 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If your calback returns `false` the pair will be removed from the narrowphase. This will stop them testing for collision this step. * Returning `true` from the callback will ensure they are checked in the narrowphase. * - * @param callback - The callback that will receive the postBroadphase event data. It must return a boolean. Set to null to disable an existing callback. - * @param context - The context under which the callback will be fired. + * @param callback The callback that will receive the postBroadphase event data. It must return a boolean. Set to null to disable an existing callback. + * @param context The context under which the callback will be fired. */ setPostBroadphaseCallback(callback: Function, context: any): void; setWorldMaterial(material: Phaser.Physics.P2.Material, left?: boolean, right?: boolean, top?: boolean, bottom?: boolean): void; /** * Converts the current world into a JSON object. - * @return - A JSON representation of the world. + * @return A JSON representation of the world. */ toJSON(): any; @@ -14209,7 +14209,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If you start to use your own collision groups then your objects will no longer collide with the bounds. * To fix this you need to adjust the bounds to use its own collision group first BEFORE changing your Sprites collision group. * - * @param setCollisionGroup - If true the Bounds will be set to use its own Collision Group. - Default: true + * @param setCollisionGroup If true the Bounds will be set to use its own Collision Group. - Default: true */ updateBoundsCollisionGroup(setCollisionGroup?: boolean): void; @@ -14253,11 +14253,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Note: When bound to a Sprite to avoid single-pixel jitters on mobile devices we strongly recommend using Sprite sizes that are even on both axis, i.e. 128x128 not 127x127. * Note: When a game object is given a P2 body it has its anchor x/y set to 0.5, so it becomes centered. * - * @param game - Game reference to the currently running game. - * @param sprite - The Sprite object this physics body belongs to. - * @param x - The x coordinate of this Body. - Default: 0 - * @param y - The y coordinate of this Body. - Default: 0 - * @param mass - The default mass of this Body (0 = static). - Default: 1 + * @param game Game reference to the currently running game. + * @param sprite The Sprite object this physics body belongs to. + * @param x The x coordinate of this Body. - Default: 0 + * @param y The y coordinate of this Body. - Default: 0 + * @param mass The default mass of this Body (0 = static). - Default: 1 */ constructor(game: Phaser.Game, sprite?: Phaser.Sprite, x?: number, y?: number, mass?: number); @@ -14450,31 +14450,31 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Adds a Capsule shape to this Body. * You can control the offset from the center of the body and the rotation. * - * @param length - The distance between the end points in pixels. - * @param radius - Radius of the capsule in pixels. - * @param offsetX - Local horizontal offset of the shape relative to the body center of mass. - Default: 0 - * @param offsetY - Local vertical offset of the shape relative to the body center of mass. - Default: 0 - * @param rotation - Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 - * @return - The Capsule shape that was added to the Body. + * @param length The distance between the end points in pixels. + * @param radius Radius of the capsule in pixels. + * @param offsetX Local horizontal offset of the shape relative to the body center of mass. - Default: 0 + * @param offsetY Local vertical offset of the shape relative to the body center of mass. - Default: 0 + * @param rotation Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 + * @return The Capsule shape that was added to the Body. */ addCapsule(length: number, radius: number, offsetX?: number, offsetY?: number, rotation?: number): p2.Capsule; /** * Adds a Circle shape to this Body. You can control the offset from the center of the body and the rotation. * - * @param radius - The radius of this circle (in pixels) - * @param offsetX - Local horizontal offset of the shape relative to the body center of mass. - Default: 0 - * @param offsetY - Local vertical offset of the shape relative to the body center of mass. - Default: 0 - * @param rotation - Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 - * @return - The Circle shape that was added to the Body. + * @param radius The radius of this circle (in pixels) + * @param offsetX Local horizontal offset of the shape relative to the body center of mass. - Default: 0 + * @param offsetY Local vertical offset of the shape relative to the body center of mass. - Default: 0 + * @param rotation Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 + * @return The Circle shape that was added to the Body. */ addCircle(radius: number, offsetX?: number, offsetY?: number, rotation?: number): p2.Circle; /** * Add a polygon fixture. This is used during #loadPolygon. * - * @param fixtureData - The data for the fixture. It contains: isSensor, filter (collision) and the actual polygon shapes. - * @return - An array containing the generated shapes for the given polygon. + * @param fixtureData The data for the fixture. It contains: isSensor, filter (collision) and the actual polygon shapes. + * @return An array containing the generated shapes for the given polygon. */ addFixture(fixtureData: string): p2.Shape[]; @@ -14483,21 +14483,21 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The line shape is along the x direction, and stretches from [-length/2, 0] to [length/2,0]. * You can control the offset from the center of the body and the rotation. * - * @param length - The length of this line (in pixels) - * @param offsetX - Local horizontal offset of the shape relative to the body center of mass. - Default: 0 - * @param offsetY - Local vertical offset of the shape relative to the body center of mass. - Default: 0 - * @param rotation - Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 - * @return - The Line shape that was added to the Body. + * @param length The length of this line (in pixels) + * @param offsetX Local horizontal offset of the shape relative to the body center of mass. - Default: 0 + * @param offsetY Local vertical offset of the shape relative to the body center of mass. - Default: 0 + * @param rotation Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 + * @return The Line shape that was added to the Body. */ addLine(length: number, offsetX?: number, offsetY?: number, rotation?: number): p2.Line; /** * Adds a Particle shape to this Body. You can control the offset from the center of the body and the rotation. * - * @param offsetX - Local horizontal offset of the shape relative to the body center of mass. - Default: 0 - * @param offsetY - Local vertical offset of the shape relative to the body center of mass. - Default: 0 - * @param rotation - Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 - * @return - The Particle shape that was added to the Body. + * @param offsetX Local horizontal offset of the shape relative to the body center of mass. - Default: 0 + * @param offsetY Local vertical offset of the shape relative to the body center of mass. - Default: 0 + * @param rotation Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 + * @return The Particle shape that was added to the Body. */ addParticle(offsetX?: number, offsetY?: number, rotation?: number): p2.Particle; @@ -14505,14 +14505,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Reads a polygon shape path, and assembles convex shapes from that and puts them at proper offset points. The shape must be simple and without holes. * This function expects the x.y values to be given in pixels. If you want to provide them at p2 world scales then call Body.data.fromPolygon directly. * - * @param options - An object containing the build options: - * @param options.optimalDecomp - Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices. - Default: false - * @param options.skipSimpleCheck - Set to true if you already know that the path is not intersecting itself. - Default: false - * @param options.removeCollinearPoints - Set to a number (angle threshold value) to remove collinear points, or false to keep all points. - Default: false - * @param points - An array of 2d vectors that form the convex or concave polygon. - Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...], - or the arguments passed can be flat x,y values e.g. `setPolygon(options, x,y, x,y, x,y, ...)` where `x` and `y` are numbers. - * @return - True on success, else false. + * @param options An object containing the build options: + * @param options.optimalDecomp Set to true if you need optimal decomposition. Warning: very slow for polygons with more than 10 vertices. - Default: false + * @param options.skipSimpleCheck Set to true if you already know that the path is not intersecting itself. - Default: false + * @param options.removeCollinearPoints Set to a number (angle threshold value) to remove collinear points, or false to keep all points. - Default: false + * @param points An array of 2d vectors that form the convex or concave polygon. + * Either [[0,0], [0,1],...] or a flat array of numbers that will be interpreted as [x,y, x,y, ...], + * or the arguments passed can be flat x,y values e.g. `setPolygon(options, x,y, x,y, x,y, ...)` where `x` and `y` are numbers. + * @return True on success, else false. */ addPolygon(options: { optimalDecomp?: boolean; skipSimpleCheck?: boolean; removeCollinearPoints?: boolean; }, points: number[][]): boolean; @@ -14520,30 +14520,30 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Reads the shape data from a physics data file stored in the Game.Cache and adds it as a polygon to this Body. * The shape data format is based on the custom phaser export in. * - * @param key - The key of the Physics Data file as stored in Game.Cache. - * @param object - The key of the object within the Physics data file that you wish to load the shape data from. + * @param key The key of the Physics Data file as stored in Game.Cache. + * @param object The key of the object within the Physics data file that you wish to load the shape data from. */ addPhaserPolygon(key: string, object: string): Phaser.Physics.P2.FixtureList; /** * Adds a Plane shape to this Body. The plane is facing in the Y direction. You can control the offset from the center of the body and the rotation. * - * @param offsetX - Local horizontal offset of the shape relative to the body center of mass. - Default: 0 - * @param offsetY - Local vertical offset of the shape relative to the body center of mass. - Default: 0 - * @param rotation - Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 - * @return - The Plane shape that was added to the Body. + * @param offsetX Local horizontal offset of the shape relative to the body center of mass. - Default: 0 + * @param offsetY Local vertical offset of the shape relative to the body center of mass. - Default: 0 + * @param rotation Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 + * @return The Plane shape that was added to the Body. */ addPlane(offsetX?: number, offsetY?: number, rotation?: number): p2.Plane; /** * Adds a Rectangle shape to this Body. You can control the offset from the center of the body and the rotation. * - * @param width - The width of the rectangle in pixels. - * @param height - The height of the rectangle in pixels. - * @param offsetX - Local horizontal offset of the shape relative to the body center of mass. - Default: 0 - * @param offsetY - Local vertical offset of the shape relative to the body center of mass. - Default: 0 - * @param rotation - Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 - * @return - The Rectangle shape that was added to the Body. + * @param width The width of the rectangle in pixels. + * @param height The height of the rectangle in pixels. + * @param offsetX Local horizontal offset of the shape relative to the body center of mass. - Default: 0 + * @param offsetY Local vertical offset of the shape relative to the body center of mass. - Default: 0 + * @param rotation Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 + * @return The Rectangle shape that was added to the Body. */ addRectangle(width: number, height: number, offsetX?: number, offsetY?: number, rotation?: number): p2.Rectangle; @@ -14551,11 +14551,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Add a shape to the body. You can pass a local transform when adding a shape, so that the shape gets an offset and an angle relative to the body center of mass. * Will automatically update the mass properties and bounding radius. * - * @param shape - The shape to add to the body. - * @param offsetX - Local horizontal offset of the shape relative to the body center of mass. - Default: 0 - * @param offsetY - Local vertical offset of the shape relative to the body center of mass. - Default: 0 - * @param rotation - Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 - * @return - The shape that was added to the body. + * @param shape The shape to add to the body. + * @param offsetX Local horizontal offset of the shape relative to the body center of mass. - Default: 0 + * @param offsetY Local vertical offset of the shape relative to the body center of mass. - Default: 0 + * @param rotation Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 + * @return The shape that was added to the body. */ addShape(shape: p2.Shape, offsetX?: number, offsetY?: number, rotation?: number): p2.Shape; @@ -14567,25 +14567,25 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Apply damping, see http://code.google.com/p/bullet/issues/detail?id=74 for details. * - * @param dt - Current time step. + * @param dt Current time step. */ applyDamping(dt: number): void; /** * Apply force to a world point. This could for example be a point on the RigidBody surface. Applying force this way will add to Body.force and Body.angularForce. * - * @param force - The force vector to add. - * @param worldX - The world x point to apply the force on. - * @param worldY - The world y point to apply the force on. + * @param force The force vector to add. + * @param worldX The world x point to apply the force on. + * @param worldY The world y point to apply the force on. */ applyForce(force: number[], worldX: number, worldY: number): void; /** * Clears the collision data from the shapes in this Body. Optionally clears Group and/or Mask. * - * @param clearGroup - Clear the collisionGroup value from the shape/s? - Default: true - * @param clearMask - Clear the collisionMask value from the shape/s? - Default: true - * @param shape - An optional Shape. If not provided the collision data will be cleared from all Shapes in this Body. + * @param clearGroup Clear the collisionGroup value from the shape/s? - Default: true + * @param clearMask Clear the collisionMask value from the shape/s? - Default: true + * @param shape An optional Shape. If not provided the collision data will be cleared from all Shapes in this Body. */ clearCollision(clearGroup?: boolean, cleanMask?: boolean, shape?: p2.Shape): void; @@ -14597,10 +14597,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Adds the given CollisionGroup, or array of CollisionGroups, to the list of groups that this body will collide with and updates the collision masks. * - * @param group - The Collision Group or Array of Collision Groups that this Bodies shapes will collide with. - * @param callback - Optional callback that will be triggered when this Body impacts with the given Group. - * @param callbackContext - The context under which the callback will be called. - * @param shape - An optional Shape. If not provided the collision mask will be added to all Shapes in this Body. + * @param group The Collision Group or Array of Collision Groups that this Bodies shapes will collide with. + * @param callback Optional callback that will be triggered when this Body impacts with the given Group. + * @param callbackContext The context under which the callback will be called. + * @param shape An optional Shape. If not provided the collision mask will be added to all Shapes in this Body. */ collides(group: any, callback?: Function, callbackContext?: any, shape?: p2.Shape): void; @@ -14610,9 +14610,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Note that the impact event happens after collision resolution, so it cannot be used to prevent a collision from happening. * It also happens mid-step. So do not destroy a Body during this callback, instead set safeDestroy to true so it will be killed on the next preUpdate. * - * @param object - The object to send impact events for. - * @param callback - The callback to fire on impact. Set to null to clear a previously set callback. - * @param callbackContext - The context under which the callback will fire. + * @param object The object to send impact events for. + * @param callback The callback to fire on impact. Set to null to clear a previously set callback. + * @param callbackContext The context under which the callback will fire. */ createBodyCallback(object: any, callback: Function, callbackContext: any): void; @@ -14623,9 +14623,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Note that the impact event happens after collision resolution, so it cannot be used to prevent a collision from happening. * It also happens mid-step. So do not destroy a Body during this callback, instead set safeDestroy to true so it will be killed on the next preUpdate. * - * @param group - The Group to send impact events for. - * @param callback - The callback to fire on impact. Set to null to clear a previously set callback. - * @param callbackContext - The context under which the callback will fire. + * @param group The Group to send impact events for. + * @param callback The callback to fire on impact. Set to null to clear a previously set callback. + * @param callbackContext The context under which the callback will fire. */ createGroupCallback(group: Phaser.Physics.P2.CollisionGroup, callback: Function, callbackContext: any): void; @@ -14636,16 +14636,16 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Gets the collision bitmask from the groups this body collides with. - * @return - The bitmask. + * @return The bitmask. */ getCollisionMask(): number; /** * Reads the shape data from a physics data file stored in the Game.Cache and adds it as a polygon to this Body. * - * @param key - The key of the Physics Data file as stored in Game.Cache. - * @param object - The key of the object within the Physics data file that you wish to load the shape data from. - * @return - True on success, else false. + * @param key The key of the Physics Data file as stored in Game.Cache. + * @param object The key of the object within the Physics data file that you wish to load the shape data from. + * @return True on success, else false. */ loadPolygon(key: string, object: string): boolean; @@ -14653,7 +14653,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Moves the Body backwards based on its current angle and the given speed. * The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms). * - * @param speed - The speed at which it should move backwards. + * @param speed The speed at which it should move backwards. */ moveBackward(speed: number): void; @@ -14661,7 +14661,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If this Body is dynamic then this will move it down by setting its y velocity to the given speed. * The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms). * - * @param speed - The speed at which it should move down, in pixels per second. + * @param speed The speed at which it should move down, in pixels per second. */ moveDown(speed: number): void; @@ -14669,7 +14669,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Moves the Body forwards based on its current angle and the given speed. * The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms). * - * @param speed - The speed at which it should move forwards. + * @param speed The speed at which it should move forwards. */ moveForward(speed: number): void; @@ -14677,7 +14677,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If this Body is dynamic then this will move it to the left by setting its x velocity to the given speed. * The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms). * - * @param speed - The speed at which it should move to the left, in pixels per second. + * @param speed The speed at which it should move to the left, in pixels per second. */ moveLeft(speed: number): void; @@ -14685,7 +14685,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If this Body is dynamic then this will move it to the right by setting its x velocity to the given speed. * The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms). * - * @param speed - The speed at which it should move to the right, in pixels per second. + * @param speed The speed at which it should move to the right, in pixels per second. */ moveRight(speed: number): void; @@ -14693,7 +14693,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If this Body is dynamic then this will move it up by setting its y velocity to the given speed. * The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms). * - * @param speed - The speed at which it should move up, in pixels per second. + * @param speed The speed at which it should move up, in pixels per second. */ moveUp(speed: number): void; @@ -14715,8 +14715,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Remove a shape from the body. Will automatically update the mass properties and bounding radius. * - * @param shape - The shape to remove from the body. - * @return - True if the shape was found and removed, else false. + * @param shape The shape to remove from the body. + * @return True if the shape was found and removed, else false. */ removeShape(shape: p2.Shape): boolean; @@ -14724,31 +14724,31 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Applies a force to the Body that causes it to 'thrust' backwards (in reverse), based on its current angle and the given speed. * The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms). * - * @param speed - The speed at which it should reverse. + * @param speed The speed at which it should reverse. */ reverse(speed: number): void; /** * This will rotate the Body by the given speed to the left (counter-clockwise). * - * @param speed - The speed at which it should rotate. + * @param speed The speed at which it should rotate. */ rotateLeft(speed: number): void; /** * This will rotate the Body by the given speed to the left (clockwise). * - * @param speed - The speed at which it should rotate. + * @param speed The speed at which it should rotate. */ rotateRight(speed: number): void; /** * Resets the Body force, velocity (linear and angular) and rotation. Optionally resets damping and mass. * - * @param x - The new x position of the Body. - * @param y - The new x position of the Body. - * @param resetDamping - Resets the linear and angular damping. - Default: false - * @param resetMass - Sets the Body mass back to 1. - Default: false + * @param x The new x position of the Body. + * @param y The new x position of the Body. + * @param resetDamping Resets the linear and angular damping. - Default: false + * @param resetMass Sets the Body mass back to 1. - Default: false */ reset(x: number, y: number, resetDamping?: boolean, resetMass?: boolean): void; @@ -14760,10 +14760,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Clears any previously set shapes. Then creates a new Circle shape and adds it to this Body. * - * @param radius - The radius of this circle (in pixels) - * @param offsetX - Local horizontal offset of the shape relative to the body center of mass. - Default: 0 - * @param offsetY - Local vertical offset of the shape relative to the body center of mass. - Default: 0 - * @param rotation - Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 + * @param radius The radius of this circle (in pixels) + * @param offsetX Local horizontal offset of the shape relative to the body center of mass. - Default: 0 + * @param offsetY Local vertical offset of the shape relative to the body center of mass. - Default: 0 + * @param rotation Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 */ setCircle(radius: number, offsetX?: number, offsetY?: number, rotation?: number): p2.Circle; @@ -14771,8 +14771,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Sets the given CollisionGroup to be the collision group for all shapes in this Body, unless a shape is specified. * This also resets the collisionMask. * - * @param group - The Collision Group that this Bodies shapes will use. - * @param shape - An optional Shape. If not provided the collision group will be added to all Shapes in this Body. + * @param group The Collision Group that this Bodies shapes will use. + * @param shape An optional Shape. If not provided the collision group will be added to all Shapes in this Body. */ setCollisionGroup(group: Phaser.Physics.P2.CollisionGroup, shape?: p2.Shape): void; @@ -14780,12 +14780,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Clears any previously set shapes. The creates a new Rectangle shape at the given size and offset, and adds it to this Body. * If you wish to create a Rectangle to match the size of a Sprite or Image see Body.setRectangleFromSprite. * - * @param width - The width of the rectangle in pixels. - Default: 16 - * @param height - The height of the rectangle in pixels. - Default: 16 - * @param offsetX - Local horizontal offset of the shape relative to the body center of mass. - Default: 0 - * @param offsetY - Local vertical offset of the shape relative to the body center of mass. - Default: 0 - * @param rotation - Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 - * @return - The Rectangle shape that was added to the Body. + * @param width The width of the rectangle in pixels. - Default: 16 + * @param height The height of the rectangle in pixels. - Default: 16 + * @param offsetX Local horizontal offset of the shape relative to the body center of mass. - Default: 0 + * @param offsetY Local vertical offset of the shape relative to the body center of mass. - Default: 0 + * @param rotation Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 + * @return The Rectangle shape that was added to the Body. */ setRectangle(width?: number, height?: number, offsetX?: number, offsetY?: number, rotation?: number): p2.Rectangle; @@ -14794,8 +14794,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Then creates a Rectangle shape sized to match the dimensions and orientation of the Sprite given. * If no Sprite is given it defaults to using the parent of this Body. * - * @param sprite - The Sprite on which the Rectangle will get its dimensions. - * @return - The Rectangle shape that was added to the Body. + * @param sprite The Sprite on which the Rectangle will get its dimensions. + * @return The Rectangle shape that was added to the Body. */ setRectangleFromSprite(sprite: any): p2.Rectangle; @@ -14803,8 +14803,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Adds the given Material to all Shapes that belong to this Body. * If you only wish to apply it to a specific Shape in this Body then provide that as the 2nd parameter. * - * @param material - The Material that will be applied. - * @param shape - An optional Shape. If not provided the Material will be added to all Shapes in this Body. + * @param material The Material that will be applied. + * @param shape An optional Shape. If not provided the Material will be added to all Shapes in this Body. */ setMaterial(material: Phaser.Physics.P2.Material, shape?: p2.Shape): void; @@ -14831,8 +14831,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Transform a world point to local body frame. * - * @param out - The vector to store the result in. - * @param worldPoint - The input world vector. + * @param out The vector to store the result in. + * @param worldPoint The input world vector. */ toLocalFrame(out: number[], worldPoint: number[]): void; @@ -14840,22 +14840,22 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Applies a force to the Body that causes it to 'thrust' forwards, based on its current angle and the given speed. * The speed is represented in pixels per second. So a value of 100 would move 100 pixels in 1 second (1000ms). * - * @param speed - The speed at which it should thrust. + * @param speed The speed at which it should thrust. */ thrust(speed: number): void; /** * Transform a local point to world frame. * - * @param out - The vector to store the result in. - * @param localPoint - The input local vector. + * @param out The vector to store the result in. + * @param localPoint The input local vector. */ toWorldFrame(out: number[], localPoint: number[]): void; /** * Updates the collisionMask. * - * @param shape - An optional Shape. If not provided the collision group will be added to all Shapes in this Body. + * @param shape An optional Shape. If not provided the collision group will be added to all Shapes in this Body. */ updateCollisionMask(shape?: p2.Shape): void; @@ -14875,9 +14875,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Needless to say, for every body you enable debug drawing on, you are adding processor and graphical overhead. * So use sparingly and rarely (if ever) in production code. * - * @param game - Game reference to the currently running game. - * @param body - The P2 Body to display debug data for. - * @param settings - Settings object. + * @param game Game reference to the currently running game. + * @param body The P2 Body to display debug data for. + * @param settings Settings object. */ constructor(game: Phaser.Game, body: Phaser.Physics.P2.Body, settings: { pixelsPerLengthUnit?: number; debugPolygons?: boolean; lineWidth?: number; alpha?: number; }); @@ -14920,7 +14920,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Collision Group * - * @param bitmask - The CollisionGroup bitmask. + * @param bitmask The CollisionGroup bitmask. */ constructor(bitmask: number); @@ -14950,13 +14950,13 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * A constraint that tries to keep the distance between two bodies constant. * - * @param world - A reference to the P2 World. - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param distance - The distance to keep between the bodies. - * @param localAnchorA - The anchor point for bodyA, defined locally in bodyA frame. Defaults to [0,0]. - * @param localAnchorB - The anchor point for bodyB, defined locally in bodyB frame. Defaults to [0,0]. - * @param maxForce - Maximum force to apply. - Default: Number.MAX_VALUE + * @param world A reference to the P2 World. + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param distance The distance to keep between the bodies. + * @param localAnchorA The anchor point for bodyA, defined locally in bodyA frame. Defaults to [0,0]. + * @param localAnchorB The anchor point for bodyB, defined locally in bodyB frame. Defaults to [0,0]. + * @param maxForce Maximum force to apply. - Default: Number.MAX_VALUE */ constructor(world: Phaser.Physics.P2, bodyA: Phaser.Physics.P2.Body, bodyB: Phaser.Physics.P2.Body, distance: number, maxForce: number); @@ -14993,7 +14993,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * This gives you the power to create a complex body built of many fixtures and modify them * during runtime (to remove parts, set masks, categories & sensor properties) * - * @param list - A list of fixtures (from Phaser.Physics.P2.Body#addPhaserPolygon) + * @param list A list of fixtures (from Phaser.Physics.P2.Body#addPhaserPolygon) */ constructor(list: any[]); @@ -15001,28 +15001,28 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * A helper to flatten arrays. This is very useful as the fixtures are nested from time to time due to the way P2 creates and splits polygons. * - * @param array - The array to flatten. Notice: This will happen recursive not shallow. + * @param array The array to flatten. Notice: This will happen recursive not shallow. */ flatten(array: any[]): any[]; /** * Accessor to get either a list of specified fixtures by key or the whole fixture list * - * @param keys - A list of fixture keys + * @param keys A list of fixture keys */ getFixtures(keys: string): any[]; /** * Accessor to get either a single fixture by its key. * - * @param key - The key of the fixture. + * @param key The key of the fixture. */ getFixtureByKey(key: string): any[]; /** * Accessor to get a group of fixtures by its group index. * - * @param groupID - The group index. + * @param groupID The group index. */ getGroup(groupID: number): any[]; init(): void; @@ -15035,32 +15035,32 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * * - * @param bit - The bit to set as the collision group. - * @param fixtureKey - Only apply to the fixture with the given key. + * @param bit The bit to set as the collision group. + * @param fixtureKey Only apply to the fixture with the given key. */ setCategory(bit: number, fictureKey: string): void; /** * * - * @param bit - The bit to set as the collision mask - * @param fixtureKey - Only apply to the fixture with the given key + * @param bit The bit to set as the collision mask + * @param fixtureKey Only apply to the fixture with the given key */ setMask(bit: number, fixtureKey: string): void; /** * * - * @param material - The contact material for a fixture - * @param fixtureKey - Only apply to the fixture with the given key + * @param material The contact material for a fixture + * @param fixtureKey Only apply to the fixture with the given key */ setMaterial(material: any, fixtureKey: string): void; /** * * - * @param value - sensor true or false - * @param fixtureKey - Only apply to the fixture with the given key + * @param value sensor true or false + * @param fixtureKey Only apply to the fixture with the given key */ setSensor(value: boolean, fixtureKey: string): void; @@ -15076,11 +15076,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Connects two bodies at given offset points, letting them rotate relative to each other around this point. * - * @param world - A reference to the P2 World. - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param angle - The relative angle - Default: 0 - * @param ratio - The gear ratio. - Default: 1 + * @param world A reference to the P2 World. + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param angle The relative angle - Default: 0 + * @param ratio The gear ratio. - Default: 1 */ constructor(world: Phaser.Physics.P2, bodyA: Phaser.Physics.P2.Body, bodyB: Phaser.Physics.P2.Body, angle?: number, ratio?: number); @@ -15107,8 +15107,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * A InversePointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays but inverses the values on set. * - * @param world - A reference to the P2 World. - * @param destination - The object to bind to. + * @param world A reference to the P2 World. + * @param destination The object to bind to. */ constructor(world: Phaser.Physics.P2, destination: any); @@ -15145,12 +15145,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Locks the relative position between two bodies. * - * @param world - A reference to the P2 World. - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param offset - The offset of bodyB in bodyA's frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param angle - The angle of bodyB in bodyA's frame. - Default: 0 - * @param maxForce - The maximum force that should be applied to constrain the bodies. + * @param world A reference to the P2 World. + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param offset The offset of bodyB in bodyA's frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param angle The angle of bodyB in bodyA's frame. - Default: 0 + * @param maxForce The maximum force that should be applied to constrain the bodies. */ constructor(world: Phaser.Physics.P2, bodyA: Phaser.Physics.P2.Body, bodyB: Phaser.Physics.P2.Body, offset?: number[], angle?: number, maxForce?: number); @@ -15180,7 +15180,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * \o/ ~ "Because I'm a Material girl" * - * @param name - The user defined name given to this Material. + * @param name The user defined name given to this Material. */ constructor(name: string); @@ -15202,8 +15202,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * A PointProxy is an internal class that allows for direct getter/setter style property access to Arrays and TypedArrays. * - * @param world - A reference to the P2 World. - * @param destination - The object to bind to. + * @param world A reference to the P2 World. + * @param destination The object to bind to. */ constructor(world: Phaser.Physics.P2, destination: any); @@ -15240,14 +15240,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Connects two bodies at given offset points, letting them rotate relative to each other around this point. * - * @param world - A reference to the P2 World. - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param lockRotation - If set to false, bodyB will be free to rotate around its anchor point. - Default: true - * @param anchorA - Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param anchorB - Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param axis - An axis, defined in body A frame, that body B's anchor point may slide along. The value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param maxForce - The maximum force that should be applied to constrain the bodies. + * @param world A reference to the P2 World. + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param lockRotation If set to false, bodyB will be free to rotate around its anchor point. - Default: true + * @param anchorA Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param anchorB Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param axis An axis, defined in body A frame, that body B's anchor point may slide along. The value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param maxForce The maximum force that should be applied to constrain the bodies. */ constructor(world: Phaser.Physics.P2, bodyA?: Phaser.Physics.P2.Body, bodyB?: Phaser.Physics.P2.Body, lockRotation?: boolean, anchorA?: number[], anchorB?: number[], axis?: number[], maxForce?: number); @@ -15283,16 +15283,16 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping. * - * @param world - A reference to the P2 World. - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param restLength - Rest length of the spring. A number > 0. - Default: 1 - * @param stiffness - Stiffness of the spring. A number >= 0. - Default: 100 - * @param damping - Damping of the spring. A number >= 0. - Default: 1 - * @param worldA - Where to hook the spring to body A in world coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param worldB - Where to hook the spring to body B in world coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param localA - Where to hook the spring to body A in local body coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param localB - Where to hook the spring to body B in local body coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param world A reference to the P2 World. + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param restLength Rest length of the spring. A number > 0. - Default: 1 + * @param stiffness Stiffness of the spring. A number >= 0. - Default: 100 + * @param damping Damping of the spring. A number >= 0. - Default: 1 + * @param worldA Where to hook the spring to body A in world coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param worldB Where to hook the spring to body B in world coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param localA Where to hook the spring to body A in local body coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param localB Where to hook the spring to body B in local body coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. */ constructor(world: Phaser.Physics.P2, bodyA: Phaser.Physics.P2.Body, bodyB: Phaser.Physics.P2.Body, restLength?: number, stiffness?: number, damping?: number, worldA?: number[], worldB?: number[], localA?: number[], localB?: number[]); @@ -15326,8 +15326,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * This is a base Plugin template to use for any Phaser plugin development. * - * @param game - A reference to the currently running game. - * @param parent - The object that owns this plugin, usually Phaser.PluginManager. + * @param game A reference to the currently running game. + * @param parent The object that owns this plugin, usually Phaser.PluginManager. */ constructor(game: Phaser.Game, parent: any); @@ -15599,7 +15599,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * The Plugin Manager is responsible for the loading, running and unloading of Phaser Plugins. * - * @param game - A reference to the currently running game. + * @param game A reference to the currently running game. */ constructor(game: Phaser.Game, parent: any); @@ -15619,9 +15619,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Add a new Plugin into the PluginManager. * The Plugin must have 2 properties: game and parent. Plugin.game is set to the game reference the PluginManager uses, and parent is set to the PluginManager. * - * @param plugin - The Plugin to add into the PluginManager. This can be a function or an existing object. - * @param args - Additional parameters that will be passed to the Plugin.init method. - * @return - The Plugin that was added to the manager. + * @param plugin The Plugin to add into the PluginManager. This can be a function or an existing object. + * @param args Additional parameters that will be passed to the Plugin.init method. + * @return The Plugin that was added to the manager. */ add(plugin: Phaser.Plugin, ...parameter: any[]): Phaser.Plugin; @@ -15652,7 +15652,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Remove a Plugin from the PluginManager. It calls Plugin.destroy on the plugin before removing it from the manager. * - * @param plugin - The plugin to be removed. + * @param plugin The plugin to be removed. */ remove(plugin: Phaser.Plugin): void; @@ -15691,8 +15691,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * `var myPoint = new Phaser.Point();` * You can also use them as 2D Vectors and you'll find different vector related methods in this class. * - * @param x - The horizontal position of this Point. - Default: 0 - * @param y - The vertical position of this Point. - Default: 0 + * @param x The horizontal position of this Point. - Default: 0 + * @param y The vertical position of this Point. - Default: 0 */ constructor(x?: number, y?: number); @@ -15711,53 +15711,53 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Adds the given x and y values to this Point. * - * @param x - The value to add to Point.x. - * @param y - The value to add to Point.y. - * @return - This Point object. Useful for chaining method calls. + * @param x The value to add to Point.x. + * @param y The value to add to Point.y. + * @return This Point object. Useful for chaining method calls. */ static add(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point; /** * Subtracts the given x and y values from this Point. * - * @param x - The value to subtract from Point.x. - * @param y - The value to subtract from Point.y. - * @return - This Point object. Useful for chaining method calls. + * @param x The value to subtract from Point.x. + * @param y The value to subtract from Point.y. + * @return This Point object. Useful for chaining method calls. */ static subtract(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point; /** * Multiplies Point.x and Point.y by the given x and y values. Sometimes known as `Scale`. * - * @param x - The value to multiply Point.x by. - * @param y - The value to multiply Point.x by. - * @return - This Point object. Useful for chaining method calls. + * @param x The value to multiply Point.x by. + * @param y The value to multiply Point.x by. + * @return This Point object. Useful for chaining method calls. */ static multiply(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point; /** * Divides Point.x and Point.y by the given x and y values. * - * @param x - The value to divide Point.x by. - * @param y - The value to divide Point.x by. - * @return - This Point object. Useful for chaining method calls. + * @param x The value to divide Point.x by. + * @param y The value to divide Point.x by. + * @return This Point object. Useful for chaining method calls. */ static divide(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point; /** * Determines whether the given objects x/y values are equal to this Point object. * - * @param a - The object to compare with this Point. - * @return - A value of true if the x and y points are equal, otherwise false. + * @param a The object to compare with this Point. + * @return A value of true if the x and y points are equal, otherwise false. */ static equals(a: Phaser.Point, b: Phaser.Point): boolean; /** * Returns the angle between this Point object and another object with public x and y properties. * - * @param a - The object to get the angle from this Point to. - * @param asDegrees - Is the given angle in radians (false) or degrees (true)? - Default: false - * @return - The angle between the two objects. + * @param a The object to get the angle from this Point to. + * @param asDegrees Is the given angle in radians (false) or degrees (true)? - Default: false + * @return The angle between the two objects. */ static angle(a: Phaser.Point, b: Phaser.Point): number; static angleSq(a: Phaser.Point, b: Phaser.Point): number; @@ -15765,31 +15765,31 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Creates a negative Point. * - * @param a - The first Point object. - * @param out - Optional Point to store the value in, if not supplied a new Point object will be created. - * @return - The new Point object. + * @param a The first Point object. + * @param out Optional Point to store the value in, if not supplied a new Point object will be created. + * @return The new Point object. */ static negative(a: Phaser.Point, out?: Phaser.Point): Phaser.Point; /** * Adds two 2D Points together and multiplies the result by the given scalar. * - * @param a - The first Point object. - * @param b - The second Point object. - * @param s - The scaling value. - * @param out - Optional Point to store the value in, if not supplied a new Point object will be created. - * @return - The new Point object. + * @param a The first Point object. + * @param b The second Point object. + * @param s The scaling value. + * @param out Optional Point to store the value in, if not supplied a new Point object will be created. + * @return The new Point object. */ static multiplyAdd(a: Phaser.Point, b: Phaser.Point, scale: number, out?: Phaser.Point): Phaser.Point; /** * Interpolates the two given Points, based on the `f` value (between 0 and 1) and returns a new Point. * - * @param a - The first Point object. - * @param b - The second Point object. - * @param f - The level of interpolation between the two points. Indicates where the new point will be, along the line between pt1 and pt2. If f=1, pt1 is returned; if f=0, pt2 is returned. - * @param out - Optional Point to store the value in, if not supplied a new Point object will be created. - * @return - The new Point object. + * @param a The first Point object. + * @param b The second Point object. + * @param f The level of interpolation between the two points. Indicates where the new point will be, along the line between pt1 and pt2. If f=1, pt1 is returned; if f=0, pt2 is returned. + * @param out Optional Point to store the value in, if not supplied a new Point object will be created. + * @return The new Point object. */ static interpolate(a: Phaser.Point, b: Phaser.Point, alpha: number, out?: Phaser.Point): Phaser.Point; @@ -15797,84 +15797,84 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Parses an object for x and/or y properties and returns a new Phaser.Point with matching values. * If the object doesn't contain those properties a Point with x/y of zero will be returned. * - * @param obj - The object to parse. - * @param xProp - The property used to set the Point.x value. - Default: 'x' - * @param yProp - The property used to set the Point.y value. - Default: 'y' - * @return - The new Point object. + * @param obj The object to parse. + * @param xProp The property used to set the Point.x value. - Default: 'x' + * @param yProp The property used to set the Point.y value. - Default: 'y' + * @return The new Point object. */ static parse(obj: any, xProp?: string, yProp?: string): Phaser.Point; /** * Make this Point perpendicular (90 degrees rotation) - * @return - This Point object. + * @return This Point object. */ static perp(a: Phaser.Point, out?: Phaser.Point): Phaser.Point; /** * Make this Point perpendicular (-90 degrees rotation) - * @return - This Point object. + * @return This Point object. */ static rperp(a: Phaser.Point, out?: Phaser.Point): Phaser.Point; /** * Returns the distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties) * - * @param dest - The target object. Must have visible x and y properties that represent the center of the object. - * @param round - Round the distance to the nearest integer (default false). - * @return - The distance between this Point object and the destination Point object. + * @param dest The target object. Must have visible x and y properties that represent the center of the object. + * @param round Round the distance to the nearest integer (default false). + * @return The distance between this Point object and the destination Point object. */ static distance(a: any, b: any, round?: boolean): number; /** * Project two Points onto another Point. * - * @param a - The first Point object. - * @param b - The second Point object. - * @param out - Optional Point to store the value in, if not supplied a new Point object will be created. - * @return - The new Point object. + * @param a The first Point object. + * @param b The second Point object. + * @param out Optional Point to store the value in, if not supplied a new Point object will be created. + * @return The new Point object. */ static project(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point; /** * Project two Points onto a Point of unit length. * - * @param a - The first Point object. - * @param b - The second Point object. - * @param out - Optional Point to store the value in, if not supplied a new Point object will be created. - * @return - The new Point object. + * @param a The first Point object. + * @param b The second Point object. + * @param out Optional Point to store the value in, if not supplied a new Point object will be created. + * @return The new Point object. */ static projectUnit(a: Phaser.Point, b: Phaser.Point, out?: Phaser.Point): Phaser.Point; /** * Right-hand normalize (make unit length) this Point. - * @return - This Point object. + * @return This Point object. */ static normalRightHand(a: Phaser.Point, out?: Phaser.Point): Phaser.Point; /** * Alters the Point object so that its length is 1, but it retains the same direction. - * @return - This Point object. + * @return This Point object. */ static normalize(a: Phaser.Point, out?: Phaser.Point): Phaser.Point; /** * Rotates this Point around the x/y coordinates given to the desired angle. * - * @param x - The x coordinate of the anchor point. - * @param y - The y coordinate of the anchor point. - * @param angle - The angle in radians (unless asDegrees is true) to rotate the Point to. - * @param asDegrees - Is the given rotation in radians (false) or degrees (true)? - * @param distance - An optional distance constraint between the Point and the anchor. - * @return - The modified point object. + * @param x The x coordinate of the anchor point. + * @param y The y coordinate of the anchor point. + * @param angle The angle in radians (unless asDegrees is true) to rotate the Point to. + * @param asDegrees Is the given rotation in radians (false) or degrees (true)? + * @param distance An optional distance constraint between the Point and the anchor. + * @return The modified point object. */ static rotate(a: Phaser.Point, x: number, y: number, angle: number, asDegrees?: boolean, distance?: number): Phaser.Point; /** * Calculates centroid (or midpoint) from an array of points. If only one point is provided, that point is returned. * - * @param points - The array of one or more points. - * @param out - Optional Point to store the value in, if not supplied a new Point object will be created. - * @return - The new Point object. + * @param points The array of one or more points. + * @param out Optional Point to store the value in, if not supplied a new Point object will be created. + * @return The new Point object. */ static centroid(points: Phaser.Point[], out?: Phaser.Point): Phaser.Point; @@ -15882,18 +15882,18 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Adds the given x and y values to this Point. * - * @param x - The value to add to Point.x. - * @param y - The value to add to Point.y. - * @return - This Point object. Useful for chaining method calls. + * @param x The value to add to Point.x. + * @param y The value to add to Point.y. + * @return This Point object. Useful for chaining method calls. */ add(x: number, y: number): Phaser.Point; /** * Returns the angle between this Point object and another object with public x and y properties. * - * @param a - The object to get the angle from this Point to. - * @param asDegrees - Is the given angle in radians (false) or degrees (true)? - Default: false - * @return - The angle between the two objects. + * @param a The object to get the angle from this Point to. + * @param asDegrees Is the given angle in radians (false) or degrees (true)? - Default: false + * @return The angle between the two objects. */ angle(a: Phaser.Point, asDegrees?: boolean): number; angleSq(a: Phaser.Point): number; @@ -15901,174 +15901,174 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Clamps this Point object values to be between the given min and max. * - * @param min - The minimum value to clamp this Point to. - * @param max - The maximum value to clamp this Point to. - * @return - This Point object. + * @param min The minimum value to clamp this Point to. + * @param max The maximum value to clamp this Point to. + * @return This Point object. */ clamp(min: number, max: number): Phaser.Point; /** * Clamps the x value of this Point to be between the given min and max. * - * @param min - The minimum value to clamp this Point to. - * @param max - The maximum value to clamp this Point to. - * @return - This Point object. + * @param min The minimum value to clamp this Point to. + * @param max The maximum value to clamp this Point to. + * @return This Point object. */ clampX(min: number, max: number): Phaser.Point; /** * Clamps the y value of this Point to be between the given min and max * - * @param min - The minimum value to clamp this Point to. - * @param max - The maximum value to clamp this Point to. - * @return - This Point object. + * @param min The minimum value to clamp this Point to. + * @param max The maximum value to clamp this Point to. + * @return This Point object. */ clampY(min: number, max: number): Phaser.Point; /** * Creates a copy of the given Point. * - * @param output - Optional Point object. If given the values will be set into this object, otherwise a brand new Point object will be created and returned. - * @return - The new Point object. + * @param output Optional Point object. If given the values will be set into this object, otherwise a brand new Point object will be created and returned. + * @return The new Point object. */ clone(output?: Phaser.Point): Phaser.Point; /** * Copies the x and y properties from any given object to this Point. * - * @param source - The object to copy from. - * @return - This Point object. + * @param source The object to copy from. + * @return This Point object. */ copyFrom(source: Phaser.Point): Phaser.Point; /** * Copies the x and y properties from this Point to any given object. * - * @param dest - The object to copy to. - * @return - The dest object. + * @param dest The object to copy to. + * @return The dest object. */ copyTo(dest: T): T; /** * Math.ceil() both the x and y properties of this Point. - * @return - This Point object. + * @return This Point object. */ ceil(): Phaser.Point; /** * The cross product of this and another Point object. * - * @param a - The Point object to get the cross product combined with this Point. - * @return - The result. + * @param a The Point object to get the cross product combined with this Point. + * @return The result. */ cross(a: Phaser.Point): number; /** * Divides Point.x and Point.y by the given x and y values. * - * @param x - The value to divide Point.x by. - * @param y - The value to divide Point.x by. - * @return - This Point object. Useful for chaining method calls. + * @param x The value to divide Point.x by. + * @param y The value to divide Point.x by. + * @return This Point object. Useful for chaining method calls. */ divide(x: number, y: number): Phaser.Point; /** * Returns the distance of this Point object to the given object (can be a Circle, Point or anything with x/y properties) * - * @param dest - The target object. Must have visible x and y properties that represent the center of the object. - * @param round - Round the distance to the nearest integer (default false). - * @return - The distance between this Point object and the destination Point object. + * @param dest The target object. Must have visible x and y properties that represent the center of the object. + * @param round Round the distance to the nearest integer (default false). + * @return The distance between this Point object and the destination Point object. */ distance(dest: Phaser.Point, round?: boolean): number; /** * The dot product of this and another Point object. * - * @param a - The Point object to get the dot product combined with this Point. - * @return - The result. + * @param a The Point object to get the dot product combined with this Point. + * @return The result. */ dot(a: Phaser.Point): number; /** * Determines whether the given objects x/y values are equal to this Point object. * - * @param a - The object to compare with this Point. - * @return - A value of true if the x and y points are equal, otherwise false. + * @param a The object to compare with this Point. + * @return A value of true if the x and y points are equal, otherwise false. */ equals(a: Phaser.Point): boolean; /** * Math.floor() both the x and y properties of this Point. - * @return - This Point object. + * @return This Point object. */ floor(): Phaser.Point; /** * Calculates the length of the Point object. - * @return - The length of the Point. + * @return The length of the Point. */ getMagnitude(): number; /** * Calculates the length squared of the Point object. - * @return - The length ^ 2 of the Point. + * @return The length ^ 2 of the Point. */ getMagnitudeSq(): number; /** * Inverts the x and y values of this Point - * @return - This Point object. + * @return This Point object. */ invert(): Phaser.Point; /** * Determine if this point is at 0,0. - * @return - True if this Point is 0,0, otherwise false. + * @return True if this Point is 0,0, otherwise false. */ isZero(): boolean; /** * Multiplies Point.x and Point.y by the given x and y values. Sometimes known as `Scale`. * - * @param x - The value to multiply Point.x by. - * @param y - The value to multiply Point.x by. - * @return - This Point object. Useful for chaining method calls. + * @param x The value to multiply Point.x by. + * @param y The value to multiply Point.x by. + * @return This Point object. Useful for chaining method calls. */ multiply(x: number, y: number): Phaser.Point; /** * Alters the Point object so that its length is 1, but it retains the same direction. - * @return - This Point object. + * @return This Point object. */ normalize(): Phaser.Point; /** * Right-hand normalize (make unit length) this Point. - * @return - This Point object. + * @return This Point object. */ normalRightHand(): Phaser.Point; /** * Make this Point perpendicular (90 degrees rotation) - * @return - This Point object. + * @return This Point object. */ perp(): Phaser.Point; /** * Make this Point perpendicular (-90 degrees rotation) - * @return - This Point object. + * @return This Point object. */ rperp(): Phaser.Point; /** * Rotates this Point around the x/y coordinates given to the desired angle. * - * @param x - The x coordinate of the anchor point. - * @param y - The y coordinate of the anchor point. - * @param angle - The angle in radians (unless asDegrees is true) to rotate the Point to. - * @param asDegrees - Is the given rotation in radians (false) or degrees (true)? - * @param distance - An optional distance constraint between the Point and the anchor. - * @return - The modified point object. + * @param x The x coordinate of the anchor point. + * @param y The y coordinate of the anchor point. + * @param angle The angle in radians (unless asDegrees is true) to rotate the Point to. + * @param asDegrees Is the given rotation in radians (false) or degrees (true)? + * @param distance An optional distance constraint between the Point and the anchor. + * @return The modified point object. */ rotate(x: number, y: number, angle: number, asDegrees?: boolean, distance?: number): Phaser.Point; @@ -16077,17 +16077,17 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If you omit the `y` value then the `x` value will be applied to both, for example: * `Point.setTo(2)` is the same as `Point.setTo(2, 2)` * - * @param x - The horizontal value of this point. - * @param y - The vertical value of this point. If not given the x value will be used in its place. - * @return - This Point object. Useful for chaining method calls. + * @param x The horizontal value of this point. + * @param y The vertical value of this point. If not given the x value will be used in its place. + * @return This Point object. Useful for chaining method calls. */ set(x: number, y?: number): Phaser.Point; /** * Alters the length of the Point without changing the direction. * - * @param magnitude - The desired magnitude of the resulting Point. - * @return - This Point object. + * @param magnitude The desired magnitude of the resulting Point. + * @return This Point object. */ setMagnitude(magnitude: number): Phaser.Point; @@ -16096,24 +16096,24 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If you omit the `y` value then the `x` value will be applied to both, for example: * `Point.setTo(2)` is the same as `Point.setTo(2, 2)` * - * @param x - The horizontal value of this point. - * @param y - The vertical value of this point. If not given the x value will be used in its place. - * @return - This Point object. Useful for chaining method calls. + * @param x The horizontal value of this point. + * @param y The vertical value of this point. If not given the x value will be used in its place. + * @return This Point object. Useful for chaining method calls. */ setTo(x: number, y?: number): Phaser.Point; /** * Subtracts the given x and y values from this Point. * - * @param x - The value to subtract from Point.x. - * @param y - The value to subtract from Point.y. - * @return - This Point object. Useful for chaining method calls. + * @param x The value to subtract from Point.x. + * @param y The value to subtract from Point.y. + * @return This Point object. Useful for chaining method calls. */ subtract(x: number, y: number): Phaser.Point; /** * Returns a string representation of this object. - * @return - A string representation of the instance. + * @return A string representation of the instance. */ toString(): string; @@ -16129,8 +16129,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * A Pointer object is used by the Mouse, Touch and MSPoint managers and represents a single finger on the touch screen. * - * @param game - A reference to the currently running game. - * @param id - The ID of the Pointer object within the game. Each game can have up to 10 active pointers. + * @param game A reference to the currently running game. + * @param id The ID of the Pointer object within the game. Each game can have up to 10 active pointers. */ constructor(game: Phaser.Game, id: number); @@ -16361,10 +16361,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * This is used internally by the ScaleManager; click trampoline usage is uncommon. * Click trampolines can only be added to pointers that are currently down. * - * @param name - The name of the trampoline; must be unique among active trampolines in this pointer. - * @param callback - Callback to run/trampoline. - * @param callbackContext - Context of the callback. - * @param callbackArgs - Additional callback args, if any. Supplied as an array. + * @param name The name of the trampoline; must be unique among active trampolines in this pointer. + * @param callback Callback to run/trampoline. + * @param callbackContext Context of the callback. + * @param callbackArgs Additional callback args, if any. Supplied as an array. */ addClickTrampoline(name: string, callback: Function, callbackContext: any, ...callbackArgs: any[]): void; @@ -16373,8 +16373,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Note that calling justPressed doesn't reset the pressed status of the Pointer, it will return `true` for as long as the duration is valid. * If you wish to check if the Pointer was pressed down just once then see the Sprite.events.onInputDown event. * - * @param duration - The time to check against. If none given it will use InputManager.justPressedRate. - * @return - true if the Pointer was pressed down within the duration given. + * @param duration The time to check against. If none given it will use InputManager.justPressedRate. + * @return true if the Pointer was pressed down within the duration given. */ justPressed(duration?: number): boolean; @@ -16383,23 +16383,23 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Note that calling justReleased doesn't reset the pressed status of the Pointer, it will return `true` for as long as the duration is valid. * If you wish to check if the Pointer was released just once then see the Sprite.events.onInputUp event. * - * @param duration - The time to check against. If none given it will use InputManager.justReleasedRate. - * @return - true if the Pointer was released within the duration given. + * @param duration The time to check against. If none given it will use InputManager.justReleasedRate. + * @return true if the Pointer was released within the duration given. */ justReleased(duration?: number): boolean; /** * Called when the Pointer leaves the target area. * - * @param event - The event passed up from the input handler. + * @param event The event passed up from the input handler. */ leave(event: any): void; /** * Called when the Pointer is moved. * - * @param event - The event passed up from the input handler. - * @param fromClick - Was this called from the click event? - Default: false + * @param event The event passed up from the input handler. + * @param fromClick Was this called from the click event? - Default: false */ move(event: any, fromClick?: boolean): void; @@ -16416,14 +16416,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Called when the Pointer is pressed onto the touchscreen. * - * @param event - The DOM event from the browser. + * @param event The DOM event from the browser. */ start(event: any): void; /** * Called when the Pointer leaves the touchscreen. * - * @param event - The event passed up from the input handler. + * @param event The event passed up from the input handler. */ stop(event: any): void; @@ -16462,7 +16462,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * - As separate objects with public x/y properties arguments: `setTo(obj1, obj2, ...)` * - As separate arguments representing point coordinates: `setTo(x1,y1, x2,y2, ...)` * - * @param points - The points to set. + * @param points The points to set. */ constructor(points: any[]); @@ -16489,17 +16489,17 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Creates a copy of the given Polygon. * This is a deep clone, the resulting copy contains new Phaser.Point objects * - * @param output - The polygon to update. If not specified a new polygon will be created. - Default: (new Polygon) - * @return - The cloned (`output`) polygon object. + * @param output The polygon to update. If not specified a new polygon will be created. - Default: (new Polygon) + * @return The cloned (`output`) polygon object. */ clone(output: Phaser.Polygon): Phaser.Polygon; /** * Checks whether the x and y coordinates are contained within this polygon. * - * @param x - The X value of the coordinate to test. - * @param y - The Y value of the coordinate to test. - * @return - True if the coordinates are within this polygon, otherwise false. + * @param x The X value of the coordinate to test. + * @param y The Y value of the coordinate to test. + * @return True if the coordinates are within this polygon, otherwise false. */ contains(x: number, y: number): boolean; @@ -16517,8 +16517,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * `setTo` may also be called without any arguments to remove all points. * - * @param points - The points to set. - * @return - This Polygon object + * @param points The points to set. + * @return This Polygon object */ setTo(points: any[]): void; @@ -16538,13 +16538,13 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * However I've tweaked it massively to add node indexing, removed lots of temp. var creation and significantly increased performance as a result. * Original version at https://github.com/timohausmann/quadtree-js/ * - * @param x - The top left coordinate of the quadtree. - * @param y - The top left coordinate of the quadtree. - * @param width - The width of the quadtree in pixels. - * @param height - The height of the quadtree in pixels. - * @param maxObjects - The maximum number of objects per node. - Default: 10 - * @param maxLevels - The maximum number of levels to iterate to. - Default: 4 - * @param level - Which level is this? - Default: 0 + * @param x The top left coordinate of the quadtree. + * @param y The top left coordinate of the quadtree. + * @param width The width of the quadtree in pixels. + * @param height The height of the quadtree in pixels. + * @param maxObjects The maximum number of objects per node. - Default: 10 + * @param maxLevels The maximum number of levels to iterate to. - Default: 4 + * @param level Which level is this? - Default: 0 */ constructor(x: number, y: number, width: number, height: number, maxObject?: number, maxLevels?: number, level?: number); @@ -16599,50 +16599,50 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Determine which node the object belongs to. * - * @param rect - The bounds in which to check. - * @return - index - Index of the subnode (0-3), or -1 if rect cannot completely fit within a subnode and is part of the parent node. + * @param rect The bounds in which to check. + * @return index - Index of the subnode (0-3), or -1 if rect cannot completely fit within a subnode and is part of the parent node. */ getIndex(rect: any): number; /** * Insert the object into the node. If the node exceeds the capacity, it will split and add all objects to their corresponding subnodes. * - * @param body - The Body object to insert into the quadtree. Can be any object so long as it exposes x, y, right and bottom properties. + * @param body The Body object to insert into the quadtree. Can be any object so long as it exposes x, y, right and bottom properties. */ insert(body: any): void; /** * Populates this quadtree with the children of the given Group. In order to be added the child must exist and have a body property. * - * @param group - The Group to add to the quadtree. + * @param group The Group to add to the quadtree. */ populate(group: Phaser.Group): void; /** * Handler for the populate method. * - * @param sprite - The Sprite to check. + * @param sprite The Sprite to check. */ populateHandler(sprite: Phaser.Sprite): void; /** * Resets the QuadTree. * - * @param x - The top left coordinate of the quadtree. - * @param y - The top left coordinate of the quadtree. - * @param width - The width of the quadtree in pixels. - * @param height - The height of the quadtree in pixels. - * @param maxObjects - The maximum number of objects per node. - Default: 10 - * @param maxLevels - The maximum number of levels to iterate to. - Default: 4 - * @param level - Which level is this? - Default: 0 + * @param x The top left coordinate of the quadtree. + * @param y The top left coordinate of the quadtree. + * @param width The width of the quadtree in pixels. + * @param height The height of the quadtree in pixels. + * @param maxObjects The maximum number of objects per node. - Default: 10 + * @param maxLevels The maximum number of levels to iterate to. - Default: 4 + * @param level Which level is this? - Default: 0 */ reset(x: number, y: number, width: number, height: number, maxObject?: number, maxLevels?: number, level?: number): void; /** * Return all objects that could collide with the given Sprite or Rectangle. * - * @param source - The source object to check the QuadTree against. Either a Sprite or Rectangle. - * @return - - Array with all detected objects. + * @param source The source object to check the QuadTree against. Either a Sprite or Rectangle. + * @return - Array with all detected objects. */ retrieve(source: any): any[]; @@ -16677,14 +16677,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * - https://github.com/nquinlan/better-random-numbers-for-javascript-mirror * - http://baagoe.org/en/wiki/Better_random_numbers_for_javascript (original, perm. 404) * - * @param seeds - An array of values to use as the seed. + * @param seeds An array of values to use as the seed. */ constructor(seeds: number[]); /** * Returns a random angle between -180 and 180. - * @return - A random number between -180 and 180. + * @return A random number between -180 and 180. */ angle(): number; @@ -16692,59 +16692,59 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Returns a random integer between and including min and max. * This method is an alias for RandomDataGenerator.integerInRange. * - * @param min - The minimum value in the range. - * @param max - The maximum value in the range. - * @return - A random number between min and max. + * @param min The minimum value in the range. + * @param max The maximum value in the range. + * @return A random number between min and max. */ between(min: number, max: number): number; /** * Returns a random real number between 0 and 1. - * @return - A random real number between 0 and 1. + * @return A random real number between 0 and 1. */ frac(): number; /** * Returns a random integer between 0 and 2^32. - * @return - A random integer between 0 and 2^32. + * @return A random integer between 0 and 2^32. */ integer(): number; /** * Returns a random integer between and including min and max. * - * @param min - The minimum value in the range. - * @param max - The maximum value in the range. - * @return - A random number between min and max. + * @param min The minimum value in the range. + * @param max The maximum value in the range. + * @return A random number between min and max. */ integerInRange(min: number, max: number): number; /** * Returns a random real number between -1 and 1. - * @return - A random real number between -1 and 1. + * @return A random real number between -1 and 1. */ normal(): number; /** * Returns a random member of `array`. * - * @param ary - An Array to pick a random member of. - * @return - A random member of the array. + * @param ary An Array to pick a random member of. + * @return A random member of the array. */ pick(ary: T[]): T; /** * Returns a random real number between 0 and 2^32. - * @return - A random real number between 0 and 2^32. + * @return A random real number between 0 and 2^32. */ real(): number; /** * Returns a random real number between min and max. * - * @param min - The minimum value in the range. - * @param max - The maximum value in the range. - * @return - A random number between min and max. + * @param min The minimum value in the range. + * @param max The maximum value in the range. + * @return A random number between min and max. */ realInRange(min: number, max: number): number; @@ -16753,30 +16753,30 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * _Note_: the seed array is only processed up to the first `undefined` (or `null`) value, should such be present. * - * @param seeds - The array of seeds: the `toString()` of each value is used. + * @param seeds The array of seeds: the `toString()` of each value is used. */ sow(seeds: number[]): void; /** * Returns a random timestamp between min and max, or between the beginning of 2000 and the end of 2020 if min and max aren't specified. * - * @param min - The minimum value in the range. - * @param max - The maximum value in the range. - * @return - A random timestamp between min and max. + * @param min The minimum value in the range. + * @param max The maximum value in the range. + * @return A random timestamp between min and max. */ timestamp(min: number, max: number): number; /** * Returns a valid RFC4122 version4 ID hex string from https://gist.github.com/1308368 - * @return - A valid RFC4122 version4 ID hex string + * @return A valid RFC4122 version4 ID hex string */ uuid(): number; /** * Returns a random member of `array`, favoring the earlier entries. * - * @param ary - An Array to pick a random member of. - * @return - A random member of the array. + * @param ary An Array to pick a random member of. + * @return A random member of the array. */ weightedPick(ary: T[]): T; @@ -16794,10 +16794,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Creates a new Rectangle object with the top-left corner specified by the x and y parameters and with the specified width and height parameters. * If you call this function without parameters, a Rectangle with x, y, width, and height properties set to 0 is created. * - * @param x - The x coordinate of the top-left corner of the Rectangle. - * @param y - The y coordinate of the top-left corner of the Rectangle. - * @param width - The width of the Rectangle. Should always be either zero or a positive value. - * @param height - The height of the Rectangle. Should always be either zero or a positive value. + * @param x The x coordinate of the top-left corner of the Rectangle. + * @param y The y coordinate of the top-left corner of the Rectangle. + * @param width The width of the Rectangle. Should always be either zero or a positive value. + * @param height The height of the Rectangle. Should always be either zero or a positive value. */ constructor(x: number, y: number, width: number, height: number); @@ -16904,48 +16904,48 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Calculates the Axis Aligned Bounding Box (or aabb) from an array of points. * - * @param points - The array of one or more points. - * @param out - Optional Rectangle to store the value in, if not supplied a new Rectangle object will be created. - * @return - The new Rectangle object. + * @param points The array of one or more points. + * @param out Optional Rectangle to store the value in, if not supplied a new Rectangle object will be created. + * @return The new Rectangle object. */ static aabb(points: Phaser.Point[], out?: Phaser.Rectangle): Phaser.Rectangle; /** * Returns a new Rectangle object with the same values for the x, y, width, and height properties as the original Rectangle object. * - * @param output - Optional Rectangle object. If given the values will be set into the object, otherwise a brand new Rectangle object will be created and returned. - * @return - + * @param output Optional Rectangle object. If given the values will be set into the object, otherwise a brand new Rectangle object will be created and returned. + * @return */ static clone(a: Phaser.Rectangle, output?: Phaser.Rectangle): Phaser.Rectangle; /** * Determines whether the specified coordinates are contained within the region defined by this Rectangle object. * - * @param x - The x coordinate of the point to test. - * @param y - The y coordinate of the point to test. - * @return - A value of true if the Rectangle object contains the specified point; otherwise false. + * @param x The x coordinate of the point to test. + * @param y The y coordinate of the point to test. + * @return A value of true if the Rectangle object contains the specified point; otherwise false. */ static contains(a: Phaser.Rectangle, x: number, y: number): boolean; /** * Determines whether the specified point is contained within the rectangular region defined by this Rectangle object. This method is similar to the Rectangle.contains() method, except that it takes a Point object as a parameter. * - * @param a - The Rectangle object. - * @param point - The point object being checked. Can be Point or any object with .x and .y values. - * @return - A value of true if the Rectangle object contains the specified point; otherwise false. + * @param a The Rectangle object. + * @param point The point object being checked. Can be Point or any object with .x and .y values. + * @return A value of true if the Rectangle object contains the specified point; otherwise false. */ static containsPoint(a: Phaser.Rectangle, point: Phaser.Point): boolean; /** * Determines whether the specified coordinates are contained within the region defined by the given raw values. * - * @param rx - The x coordinate of the top left of the area. - * @param ry - The y coordinate of the top left of the area. - * @param rw - The width of the area. - * @param rh - The height of the area. - * @param x - The x coordinate of the point to test. - * @param y - The y coordinate of the point to test. - * @return - A value of true if the Rectangle object contains the specified point; otherwise false. + * @param rx The x coordinate of the top left of the area. + * @param ry The y coordinate of the top left of the area. + * @param rw The width of the area. + * @param rh The height of the area. + * @param x The x coordinate of the point to test. + * @param y The y coordinate of the point to test. + * @return A value of true if the Rectangle object contains the specified point; otherwise false. */ static containsRaw(rx: number, ry: number, rw: number, rh: number, x: number, y: number): boolean; @@ -16953,8 +16953,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Determines whether the first Rectangle object is fully contained within the second Rectangle object. * A Rectangle object is said to contain another if the second Rectangle object falls entirely within the boundaries of the first. * - * @param b - The second Rectangle object. - * @return - A value of true if the Rectangle object contains the specified point; otherwise false. + * @param b The second Rectangle object. + * @return A value of true if the Rectangle object contains the specified point; otherwise false. */ static containsRect(a: Phaser.Rectangle, b: Phaser.Rectangle): boolean; @@ -16962,35 +16962,35 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Determines whether the two Rectangles are equal. * This method compares the x, y, width and height properties of each Rectangle. * - * @param b - The second Rectangle object. - * @return - A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false. + * @param b The second Rectangle object. + * @return A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false. */ static equals(a: Phaser.Rectangle, b: Phaser.Rectangle): boolean; /** * Increases the size of the Rectangle object by the specified amounts. The center point of the Rectangle object stays the same, and its size increases to the left and right by the dx value, and to the top and the bottom by the dy value. * - * @param dx - The amount to be added to the left side of the Rectangle. - * @param dy - The amount to be added to the bottom side of the Rectangle. - * @return - This Rectangle object. + * @param dx The amount to be added to the left side of the Rectangle. + * @param dy The amount to be added to the bottom side of the Rectangle. + * @return This Rectangle object. */ static inflate(a: Phaser.Rectangle, dx: number, dy: number): Phaser.Rectangle; /** * Increases the size of the Rectangle object. This method is similar to the Rectangle.inflate() method except it takes a Point object as a parameter. * - * @param a - The Rectangle object. - * @param point - The x property of this Point object is used to increase the horizontal dimension of the Rectangle object. The y property is used to increase the vertical dimension of the Rectangle object. - * @return - The Rectangle object. + * @param a The Rectangle object. + * @param point The x property of this Point object is used to increase the horizontal dimension of the Rectangle object. The y property is used to increase the vertical dimension of the Rectangle object. + * @return The Rectangle object. */ static inflatePoint(a: Phaser.Rectangle, point: Phaser.Point): Phaser.Rectangle; /** * If the Rectangle object specified in the toIntersect parameter intersects with this Rectangle object, returns the area of intersection as a Rectangle object. If the Rectangles do not intersect, this method returns an empty Rectangle object with its properties set to 0. * - * @param b - The second Rectangle object. - * @param out - Optional Rectangle object. If given the intersection values will be set into this object, otherwise a brand new Rectangle object will be created and returned. - * @return - A Rectangle object that equals the area of intersection. If the Rectangles do not intersect, this method returns an empty Rectangle object; that is, a Rectangle with its x, y, width, and height properties set to 0. + * @param b The second Rectangle object. + * @param out Optional Rectangle object. If given the intersection values will be set into this object, otherwise a brand new Rectangle object will be created and returned. + * @return A Rectangle object that equals the area of intersection. If the Rectangles do not intersect, this method returns an empty Rectangle object; that is, a Rectangle with its x, y, width, and height properties set to 0. */ static intersection(a: Phaser.Rectangle, b: Phaser.Rectangle, out?: Phaser.Rectangle): Phaser.Rectangle; @@ -16998,37 +16998,37 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Determines whether this Rectangle and another given Rectangle intersect with each other. * This method checks the x, y, width, and height properties of the two Rectangles. * - * @param b - The second Rectangle object. - * @return - A value of true if the specified object intersects with this Rectangle object; otherwise false. + * @param b The second Rectangle object. + * @return A value of true if the specified object intersects with this Rectangle object; otherwise false. */ static intersects(a: Phaser.Rectangle, b: Phaser.Rectangle): boolean; /** * Determines whether the coordinates given intersects (overlaps) with this Rectangle. * - * @param left - The x coordinate of the left of the area. - * @param right - The right coordinate of the area. - * @param top - The y coordinate of the area. - * @param bottom - The bottom coordinate of the area. - * @param tolerance - A tolerance value to allow for an intersection test with padding, default to 0 - * @return - A value of true if the specified object intersects with the Rectangle; otherwise false. + * @param left The x coordinate of the left of the area. + * @param right The right coordinate of the area. + * @param top The y coordinate of the area. + * @param bottom The bottom coordinate of the area. + * @param tolerance A tolerance value to allow for an intersection test with padding, default to 0 + * @return A value of true if the specified object intersects with the Rectangle; otherwise false. */ static intersectsRaw(left: number, right: number, top: number, bottom: number, tolerance: number): boolean; /** * The size of the Rectangle object, expressed as a Point object with the values of the width and height properties. * - * @param output - Optional Point object. If given the values will be set into the object, otherwise a brand new Point object will be created and returned. - * @return - The size of the Rectangle object. + * @param output Optional Point object. If given the values will be set into the object, otherwise a brand new Point object will be created and returned. + * @return The size of the Rectangle object. */ static size(a: Phaser.Rectangle, output?: Phaser.Point): Phaser.Point; /** * Adds two Rectangles together to create a new Rectangle object, by filling in the horizontal and vertical space between the two Rectangles. * - * @param b - The second Rectangle object. - * @param out - Optional Rectangle object. If given the new values will be set into this object, otherwise a brand new Rectangle object will be created and returned. - * @return - A Rectangle object that is the union of the two Rectangles. + * @param b The second Rectangle object. + * @param out Optional Rectangle object. If given the new values will be set into this object, otherwise a brand new Rectangle object will be created and returned. + * @return A Rectangle object that is the union of the two Rectangles. */ static union(a: Phaser.Rectangle, b: Phaser.Rectangle, out?: Phaser.Rectangle): Phaser.Rectangle; @@ -17036,26 +17036,26 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Centers this Rectangle so that the center coordinates match the given x and y values. * - * @param x - The x coordinate to place the center of the Rectangle at. - * @param y - The y coordinate to place the center of the Rectangle at. - * @return - This Rectangle object + * @param x The x coordinate to place the center of the Rectangle at. + * @param y The y coordinate to place the center of the Rectangle at. + * @return This Rectangle object */ centerOn(x: number, y: number): Phaser.Rectangle; /** * Returns a new Rectangle object with the same values for the x, y, width, and height properties as the original Rectangle object. * - * @param output - Optional Rectangle object. If given the values will be set into the object, otherwise a brand new Rectangle object will be created and returned. - * @return - + * @param output Optional Rectangle object. If given the values will be set into the object, otherwise a brand new Rectangle object will be created and returned. + * @return */ clone(output: Phaser.Rectangle): Phaser.Rectangle; /** * Determines whether the specified coordinates are contained within the region defined by this Rectangle object. * - * @param x - The x coordinate of the point to test. - * @param y - The y coordinate of the point to test. - * @return - A value of true if the Rectangle object contains the specified point; otherwise false. + * @param x The x coordinate of the point to test. + * @param y The y coordinate of the point to test. + * @return A value of true if the Rectangle object contains the specified point; otherwise false. */ contains(x: number, y: number): boolean; @@ -17063,24 +17063,24 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Determines whether the first Rectangle object is fully contained within the second Rectangle object. * A Rectangle object is said to contain another if the second Rectangle object falls entirely within the boundaries of the first. * - * @param b - The second Rectangle object. - * @return - A value of true if the Rectangle object contains the specified point; otherwise false. + * @param b The second Rectangle object. + * @return A value of true if the Rectangle object contains the specified point; otherwise false. */ containsRect(b: Phaser.Rectangle): boolean; /** * Copies the x, y, width and height properties from any given object to this Rectangle. * - * @param source - The object to copy from. - * @return - This Rectangle object. + * @param source The object to copy from. + * @return This Rectangle object. */ copyFrom(source: any): Phaser.Rectangle; /** * Copies the x, y, width and height properties from this Rectangle to any given object. * - * @param source - The object to copy to. - * @return - This object. + * @param source The object to copy to. + * @return This object. */ copyTo(dest: any): any; @@ -17088,8 +17088,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Determines whether the two Rectangles are equal. * This method compares the x, y, width and height properties of each Rectangle. * - * @param b - The second Rectangle object. - * @return - A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false. + * @param b The second Rectangle object. + * @return A value of true if the two Rectangles have exactly the same values for the x, y, width and height properties; otherwise false. */ equals(b: Phaser.Rectangle): boolean; @@ -17106,18 +17106,18 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Increases the size of the Rectangle object by the specified amounts. The center point of the Rectangle object stays the same, and its size increases to the left and right by the dx value, and to the top and the bottom by the dy value. * - * @param dx - The amount to be added to the left side of the Rectangle. - * @param dy - The amount to be added to the bottom side of the Rectangle. - * @return - This Rectangle object. + * @param dx The amount to be added to the left side of the Rectangle. + * @param dy The amount to be added to the bottom side of the Rectangle. + * @return This Rectangle object. */ inflate(dx: number, dy: number): Phaser.Rectangle; /** * If the Rectangle object specified in the toIntersect parameter intersects with this Rectangle object, returns the area of intersection as a Rectangle object. If the Rectangles do not intersect, this method returns an empty Rectangle object with its properties set to 0. * - * @param b - The second Rectangle object. - * @param out - Optional Rectangle object. If given the intersection values will be set into this object, otherwise a brand new Rectangle object will be created and returned. - * @return - A Rectangle object that equals the area of intersection. If the Rectangles do not intersect, this method returns an empty Rectangle object; that is, a Rectangle with its x, y, width, and height properties set to 0. + * @param b The second Rectangle object. + * @param out Optional Rectangle object. If given the intersection values will be set into this object, otherwise a brand new Rectangle object will be created and returned. + * @return A Rectangle object that equals the area of intersection. If the Rectangles do not intersect, this method returns an empty Rectangle object; that is, a Rectangle with its x, y, width, and height properties set to 0. */ intersection(b: Phaser.Rectangle, out: Phaser.Rectangle): Phaser.Rectangle; @@ -17125,80 +17125,80 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Determines whether this Rectangle and another given Rectangle intersect with each other. * This method checks the x, y, width, and height properties of the two Rectangles. * - * @param b - The second Rectangle object. - * @return - A value of true if the specified object intersects with this Rectangle object; otherwise false. + * @param b The second Rectangle object. + * @return A value of true if the specified object intersects with this Rectangle object; otherwise false. */ intersects(b: Phaser.Rectangle, tolerance: number): boolean; /** * Determines whether the coordinates given intersects (overlaps) with this Rectangle. * - * @param left - The x coordinate of the left of the area. - * @param right - The right coordinate of the area. - * @param top - The y coordinate of the area. - * @param bottom - The bottom coordinate of the area. - * @param tolerance - A tolerance value to allow for an intersection test with padding, default to 0 - * @return - A value of true if the specified object intersects with the Rectangle; otherwise false. + * @param left The x coordinate of the left of the area. + * @param right The right coordinate of the area. + * @param top The y coordinate of the area. + * @param bottom The bottom coordinate of the area. + * @param tolerance A tolerance value to allow for an intersection test with padding, default to 0 + * @return A value of true if the specified object intersects with the Rectangle; otherwise false. */ intersectsRaw(left: number, right: number, top: number, bottom: number, tolerance: number): boolean; /** * Adjusts the location of the Rectangle object, as determined by its top-left corner, by the specified amounts. * - * @param dx - Moves the x value of the Rectangle object by this amount. - * @param dy - Moves the y value of the Rectangle object by this amount. - * @return - This Rectangle object. + * @param dx Moves the x value of the Rectangle object by this amount. + * @param dy Moves the y value of the Rectangle object by this amount. + * @return This Rectangle object. */ offset(dx: number, dy: number): Phaser.Rectangle; /** * Adjusts the location of the Rectangle object using a Point object as a parameter. This method is similar to the Rectangle.offset() method, except that it takes a Point object as a parameter. * - * @param point - A Point object to use to offset this Rectangle object. - * @return - This Rectangle object. + * @param point A Point object to use to offset this Rectangle object. + * @return This Rectangle object. */ offsetPoint(point: Phaser.Point): Phaser.Rectangle; /** * Sets the members of Rectangle to the specified values. * - * @param x - The x coordinate of the top-left corner of the Rectangle. - * @param y - The y coordinate of the top-left corner of the Rectangle. - * @param width - The width of the Rectangle. Should always be either zero or a positive value. - * @param height - The height of the Rectangle. Should always be either zero or a positive value. - * @return - This Rectangle object + * @param x The x coordinate of the top-left corner of the Rectangle. + * @param y The y coordinate of the top-left corner of the Rectangle. + * @param width The width of the Rectangle. Should always be either zero or a positive value. + * @param height The height of the Rectangle. Should always be either zero or a positive value. + * @return This Rectangle object */ setTo(x: number, y: number, width: number, height: number): Phaser.Rectangle; /** * Scales the width and height of this Rectangle by the given amounts. * - * @param x - The amount to scale the width of the Rectangle by. A value of 0.5 would reduce by half, a value of 2 would double the width, etc. - * @param y - The amount to scale the height of the Rectangle by. A value of 0.5 would reduce by half, a value of 2 would double the height, etc. - * @return - This Rectangle object + * @param x The amount to scale the width of the Rectangle by. A value of 0.5 would reduce by half, a value of 2 would double the width, etc. + * @param y The amount to scale the height of the Rectangle by. A value of 0.5 would reduce by half, a value of 2 would double the height, etc. + * @return This Rectangle object */ scale(x: number, y?: number): Phaser.Rectangle; /** * The size of the Rectangle object, expressed as a Point object with the values of the width and height properties. * - * @param output - Optional Point object. If given the values will be set into the object, otherwise a brand new Point object will be created and returned. - * @return - The size of the Rectangle object. + * @param output Optional Point object. If given the values will be set into the object, otherwise a brand new Point object will be created and returned. + * @return The size of the Rectangle object. */ size(output?: Phaser.Point): Phaser.Point; /** * Returns a string representation of this object. - * @return - A string representation of the instance. + * @return A string representation of the instance. */ toString(): string; /** * Adds two Rectangles together to create a new Rectangle object, by filling in the horizontal and vertical space between the two Rectangles. * - * @param b - The second Rectangle object. - * @param out - Optional Rectangle object. If given the new values will be set into this object, otherwise a brand new Rectangle object will be created and returned. - * @return - A Rectangle object that is the union of the two Rectangles. + * @param b The second Rectangle object. + * @param out Optional Rectangle object. If given the new values will be set into this object, otherwise a brand new Rectangle object will be created and returned. + * @return A Rectangle object that is the union of the two Rectangles. */ union(b: Phaser.Rectangle, out?: Phaser.Rectangle): Phaser.Rectangle; @@ -17216,13 +17216,13 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * A RenderTexture is a special texture that allows any displayObject to be rendered to it. It allows you to take many complex objects and * render them down into a single quad (on WebGL) which can then be used to texture other display objects with. A way of generating textures at run-time. * - * @param game - Current game instance. - * @param key - Internal Phaser reference key for the render texture. - * @param width - The width of the render texture. - Default: 100 - * @param height - The height of the render texture. - Default: 100 - * @param key - The key of the RenderTexture in the Cache, if stored there. - Default: '' - * @param scaleMode - One of the Phaser.scaleModes consts. - Default: Phaser.scaleModes.DEFAULT - * @param resolution - The resolution of the texture being generated. - Default: 1 + * @param game Current game instance. + * @param key Internal Phaser reference key for the render texture. + * @param width The width of the render texture. - Default: 100 + * @param height The height of the render texture. - Default: 100 + * @param key The key of the RenderTexture in the Cache, if stored there. - Default: '' + * @param scaleMode One of the Phaser.scaleModes consts. - Default: Phaser.scaleModes.DEFAULT + * @param resolution The resolution of the texture being generated. - Default: 1 */ constructor(game: Phaser.Game, width?: number, height?: number, key?: string, scaleMode?: number, resolution?: number); @@ -17252,19 +17252,19 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * This function will draw the display object to the texture. * - * @param displayObject - The display object to render to this texture. - * @param position - A Point object containing the position to render the display object at. - * @param clear - If true the texture will be cleared before the display object is drawn. + * @param displayObject The display object to render to this texture. + * @param position A Point object containing the position to render the display object at. + * @param clear If true the texture will be cleared before the display object is drawn. */ render(displayObject: PIXI.DisplayObject, position: Phaser.Point, clear?: boolean): void; /** * This function will draw the display object to the texture. * - * @param displayObject - The display object to render to this texture. - * @param x - The x position to render the object at. - * @param y - The y position to render the object at. - * @param clear - If true the texture will be cleared before the display object is drawn. + * @param displayObject The display object to render to this texture. + * @param x The x position to render the object at. + * @param y The y position to render the object at. + * @param clear If true the texture will be cleared before the display object is drawn. */ renderXY(displayObject: PIXI.DisplayObject, x: number, y: number, clear?: boolean): void; @@ -17280,8 +17280,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Abstracts away the use of RAF or setTimeOut for the core game update loop. * - * @param game - A reference to the currently running game. - * @param forceSetTimeOut - Tell Phaser to use setTimeOut even if raf is available. - Default: false + * @param game A reference to the currently running game. + * @param forceSetTimeOut Tell Phaser to use setTimeOut even if raf is available. - Default: false */ constructor(game: Phaser.Game, forceSetTimeOut?: boolean); @@ -17300,13 +17300,13 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Is the browser using requestAnimationFrame? - * @return - + * @return */ isRAF(): boolean; /** * Is the browser using setTimeout? - * @return - + * @return */ isSetTimeOut(): boolean; @@ -17344,16 +17344,16 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * A Retro Font is similar to a BitmapFont, in that it uses a texture to render the text. However unlike a BitmapFont every character in a RetroFont * is the same size. This makes it similar to a sprite sheet. You typically find font sheets like this from old 8/16-bit games and demos. * - * @param game - Current game instance. - * @param key - The font set graphic set as stored in the Game.Cache. - * @param characterWidth - The width of each character in the font set. - * @param characterHeight - The height of each character in the font set. - * @param chars - The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements. - * @param charsPerRow - The number of characters per row in the font set. If not given charsPerRow will be the image width / characterWidth. - * @param xSpacing - If the characters in the font set have horizontal spacing between them set the required amount here. - Default: 0 - * @param ySpacing - If the characters in the font set have vertical spacing between them set the required amount here. - Default: 0 - * @param xOffset - If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. - Default: 0 - * @param yOffset - If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. - Default: 0 + * @param game Current game instance. + * @param key The font set graphic set as stored in the Game.Cache. + * @param characterWidth The width of each character in the font set. + * @param characterHeight The height of each character in the font set. + * @param chars The characters used in the font set, in display order. You can use the TEXT_SET consts for common font set arrangements. + * @param charsPerRow The number of characters per row in the font set. If not given charsPerRow will be the image width / characterWidth. + * @param xSpacing If the characters in the font set have horizontal spacing between them set the required amount here. - Default: 0 + * @param ySpacing If the characters in the font set have vertical spacing between them set the required amount here. - Default: 0 + * @param xOffset If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. - Default: 0 + * @param yOffset If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. - Default: 0 */ constructor(game: Phaser.Game, key: string, characterWidth: number, characterHeight: number, chars: string, charsPerRow?: number, xSpacing?: number, ySpacing?: number, xOffset?: number, yOffset?: number); @@ -17524,7 +17524,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Works out the longest line of text in _text and returns its length - * @return - The length of the longest line of text. + * @return The length of the longest line of text. */ getLongestLine(): number; @@ -17532,18 +17532,18 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Internal function that takes a single line of text (2nd parameter) and pastes it into the BitmapData at the given coordinates. * Used by getLine and getMultiLine * - * @param line - The single line of text to paste. - * @param x - The x coordinate. - * @param y - The y coordinate. - * @param customSpacingX - Custom X spacing. + * @param line The single line of text to paste. + * @param x The x coordinate. + * @param y The y coordinate. + * @param customSpacingX Custom X spacing. */ pasteLine(line: string, x: number, y: number, customSpacingX: number): void; /** * Internal helper function that removes all unsupported characters from the _text String, leaving only characters contained in the font set. * - * @param stripCR - Should it strip carriage returns as well? - Default: true - * @return - A clean version of the string. + * @param stripCR Should it strip carriage returns as well? - Default: true + * @return A clean version of the string. */ removeUnsupportedCharacters(stripCR?: boolean): string; @@ -17551,20 +17551,20 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If you need this RetroFont to have a fixed width and custom alignment you can set the width here. * If text is wider than the width specified it will be cropped off. * - * @param width - Width in pixels of this RetroFont. Set to zero to disable and re-enable automatic resizing. - * @param lineAlignment - Align the text within this width. Set to RetroFont.ALIGN_LEFT (default), RetroFont.ALIGN_RIGHT or RetroFont.ALIGN_CENTER. - Default: 'left' + * @param width Width in pixels of this RetroFont. Set to zero to disable and re-enable automatic resizing. + * @param lineAlignment Align the text within this width. Set to RetroFont.ALIGN_LEFT (default), RetroFont.ALIGN_RIGHT or RetroFont.ALIGN_CENTER. - Default: 'left' */ setFixedWidth(width: number, lineAlignment?: string): void; /** * A helper function that quickly sets lots of variables at once, and then updates the text. * - * @param content - The text of this sprite. - * @param multiLine - Set to true if you want to support carriage-returns in the text and create a multi-line sprite instead of a single line. - Default: false - * @param characterSpacing - To add horizontal spacing between each character specify the amount in pixels. - Default: 0 - * @param lineSpacing - To add vertical spacing between each line of text, set the amount in pixels. - Default: 0 - * @param lineAlignment - Align each line of multi-line text. Set to RetroFont.ALIGN_LEFT, RetroFont.ALIGN_RIGHT or RetroFont.ALIGN_CENTER. - Default: 'left' - * @param allowLowerCase - Lots of bitmap font sets only include upper-case characters, if yours needs to support lower case then set this to true. - Default: false + * @param content The text of this sprite. + * @param multiLine Set to true if you want to support carriage-returns in the text and create a multi-line sprite instead of a single line. - Default: false + * @param characterSpacing To add horizontal spacing between each character specify the amount in pixels. - Default: 0 + * @param lineSpacing To add vertical spacing between each line of text, set the amount in pixels. - Default: 0 + * @param lineAlignment Align each line of multi-line text. Set to RetroFont.ALIGN_LEFT, RetroFont.ALIGN_RIGHT or RetroFont.ALIGN_CENTER. - Default: 'left' + * @param allowLowerCase Lots of bitmap font sets only include upper-case characters, if yours needs to support lower case then set this to true. - Default: false */ setText(content: string, multiLine?: boolean, characterSpacing?: number, lineSpacing?: number, lineAlignment?: string, allowLowerCase?: boolean): void; @@ -17573,8 +17573,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Note that the values given for the x and y properties are either ADDED to or SUBTRACTED from (if negative) the existing offsetX/Y values of the characters. * So if the current offsetY is 8 and you want it to start rendering from y16 you would call updateOffset(0, 8) to add 8 to the current y offset. * - * @param xOffset - If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. - Default: 0 - * @param yOffset - If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. - Default: 0 + * @param xOffset If the font set doesn't start at the top left of the given image, specify the X coordinate offset here. - Default: 0 + * @param yOffset If the font set doesn't start at the top left of the given image, specify the Y coordinate offset here. - Default: 0 */ updateOffset(x?: number, y?: number): void; @@ -17594,12 +17594,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Please note that Ropes, as with normal Sprites, have no input handler or physics bodies by default. Both need enabling. * Example usage: https://github.com/codevinsky/phaser-rope-demo/blob/master/dist/demo.js * - * @param game - A reference to the currently running game. - * @param x - The x coordinate (in world space) to position the Rope at. - * @param y - The y coordinate (in world space) to position the Rope at. - * @param key - This is the image or texture used by the Rope during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. - * @param frame - If this Rope is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. - * @param points - An array of {Phaser.Point}. + * @param game A reference to the currently running game. + * @param x The x coordinate (in world space) to position the Rope at. + * @param y The y coordinate (in world space) to position the Rope at. + * @param key This is the image or texture used by the Rope during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. + * @param frame If this Rope is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. + * @param points An array of {Phaser.Point}. */ constructor(game: Phaser.Game, x: number, y: number, key: any, frame?: any, points?: Phaser.Point[]); @@ -17749,7 +17749,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Destroys the Rope. This removes it from its parent group, destroys the event and animation handlers if present * and nulls its reference to game, freeing it up for garbage collection. * - * @param destroyChildren - Should every child of this object have its destroy method called? - Default: true + * @param destroyChildren Should every child of this object have its destroy method called? - Default: true */ destroy(destroyChildren?: boolean): void; @@ -17757,8 +17757,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Changes the Texture the Rope is using entirely. The old texture is removed and the new one is referenced or fetched from the Cache. * This causes a WebGL texture update, so use sparingly or in low-intensity portions of your game. * - * @param key - This is the image or texture used by the Rope during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. - * @param frame - If this Rope is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. + * @param key This is the image or texture used by the Rope during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. + * @param frame If this Rope is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. */ loadTexture(key: any, frame?: any): void; @@ -17766,11 +17766,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Play an animation based on the given key. The animation should previously have been added via sprite.animations.add() * If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. * - * @param name - The name of the animation to be played, e.g. "fire", "walk", "jump". - * @param frameRate - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. - Default: null - * @param loop - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. - Default: false - * @param killOnComplete - If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. - Default: false - * @return - A reference to playing Animation instance. + * @param name The name of the animation to be played, e.g. "fire", "walk", "jump". + * @param frameRate The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. - Default: null + * @param loop Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. - Default: false + * @param killOnComplete If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. - Default: false + * @return A reference to playing Animation instance. */ play(): void; @@ -17789,9 +17789,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state. * If the Rope has a physics body that too is reset. * - * @param x - The x coordinate (in world space) to position the Sprite at. - * @param y - The y coordinate (in world space) to position the Sprite at. - * @return - (Phaser.Rope) This instance. + * @param x The x coordinate (in world space) to position the Sprite at. + * @param y The y coordinate (in world space) to position the Sprite at. + * @return (Phaser.Rope) This instance. */ reset(x: number, y: number): void; @@ -17799,7 +17799,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Sets the Texture frame the Rope uses for rendering. * This is primarily an internal method used by Rope.loadTexture, although you may call it directly. * - * @param frame - The Frame to be used by the Rope texture. + * @param frame The Frame to be used by the Rope texture. */ setFrame(frame: Phaser.Frame): void; @@ -17841,10 +17841,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Add an event listener. * - * @param listener - The function to call when this Signal is dispatched. - * @param listenerContext - The context under which the listener will be executed (i.e. the object that should represent the `this` variable). - * @param priority - The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added (default = 0) - * @return - An Object representing the binding between the Signal and listener. + * @param listener The function to call when this Signal is dispatched. + * @param listenerContext The context under which the listener will be executed (i.e. the object that should represent the `this` variable). + * @param priority The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added (default = 0) + * @return An Object representing the binding between the Signal and listener. */ add(listener: Function, listenerContext?: any, priority?: number): Phaser.SignalBinding; @@ -17854,10 +17854,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If there is as {@link Phaser.Signal#memorize memorized} event then it will be dispatched and * the listener will be removed immediately. * - * @param listener - The function to call when this Signal is dispatched. - * @param listenerContext - The context under which the listener will be executed (i.e. the object that should represent the `this` variable). - * @param priority - The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added (default = 0) - * @return - An Object representing the binding between the Signal and listener. + * @param listener The function to call when this Signal is dispatched. + * @param listenerContext The context under which the listener will be executed (i.e. the object that should represent the `this` variable). + * @param priority The priority level of the event listener. Listeners with higher priority will be executed before listeners with lower priority. Listeners with same priority level will be executed at the same order as they were added (default = 0) + * @return An Object representing the binding between the Signal and listener. */ addOnce(listener: Function, listenerContext?: any, priority?: number): Phaser.SignalBinding; @@ -17866,7 +17866,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * To create an instance-bound dispatch for this Signal, use {@link Phaser.Signal#boundDispatch boundDispatch}. * - * @param params - Parameters that should be passed to each handler. + * @param params Parameters that should be passed to each handler. */ dispatch(...params: any[]): void; @@ -17885,7 +17885,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Gets the total number of listeners attached to this Signal. - * @return - Number of listeners attached to the Signal. + * @return Number of listeners attached to the Signal. */ getNumListeners(): number; @@ -17900,39 +17900,39 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Check if a specific listener is attached. * - * @param listener - Signal handler function. - * @param context - Context on which listener will be executed (object that should represent the `this` variable inside listener function). - * @return - If Signal has the specified listener. + * @param listener Signal handler function. + * @param context Context on which listener will be executed (object that should represent the `this` variable inside listener function). + * @return If Signal has the specified listener. */ has(listener: Function, context?: any): boolean; /** * Remove a single event listener. * - * @param listener - Handler function that should be removed. - * @param context - Execution context (since you can add the same handler multiple times if executing in a different context). - Default: null - * @return - Listener handler function. + * @param listener Handler function that should be removed. + * @param context Execution context (since you can add the same handler multiple times if executing in a different context). - Default: null + * @return Listener handler function. */ remove(listener: Function, context?: any): Function; /** * Remove all event listeners. * - * @param context - If specified only listeners for the given context will be removed. - Default: null + * @param context If specified only listeners for the given context will be removed. - Default: null */ removeAll(context?: any): void; /** * A string representation of the object. - * @return - String representation of the object. + * @return String representation of the object. */ toString(): string; /** * * - * @param listener - Signal handler function. - * @param fnName - Function name. + * @param listener Signal handler function. + * @param fnName Function name. */ validateListener(listener: Function, fnName: string): void; @@ -17952,11 +17952,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * This is an internal constructor and shouldn't be created directly. * Inspired by Joa Ebert AS3 SignalBinding and Robert Penner's Slot classes. * - * @param signal - Reference to Signal object that listener is currently bound to. - * @param listener - Handler function bound to the signal. - * @param isOnce - If binding should be executed just once. - * @param listenerContext - Context on which listener will be executed (object that should represent the `this` variable inside listener function). - Default: null - * @param priority - The priority level of the event listener. (default = 0). + * @param signal Reference to Signal object that listener is currently bound to. + * @param listener Handler function bound to the signal. + * @param isOnce If binding should be executed just once. + * @param listenerContext Context on which listener will be executed (object that should represent the `this` variable inside listener function). - Default: null + * @param priority The priority level of the event listener. (default = 0). */ constructor(signal: Phaser.Signal, listener: Function, isOnce: boolean, listenerContext?: any, priority?: number); @@ -17988,45 +17988,45 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Call listener passing arbitrary parameters. * If binding was added using `Signal.addOnce()` it will be automatically removed from signal dispatch queue, this method is used internally for the signal dispatch. * - * @param paramsArr - Array of parameters that should be passed to the listener. - * @return - Value returned by the listener. + * @param paramsArr Array of parameters that should be passed to the listener. + * @return Value returned by the listener. */ execute(paramsArr?: any[]): void; /** * Detach binding from signal. * alias to: @see mySignal.remove(myBinding.getListener()); - * @return - Handler function bound to the signal or `null` if binding was previously detached. + * @return Handler function bound to the signal or `null` if binding was previously detached. */ detach(): Function; /** * - * @return - True if binding is still bound to the signal and has a listener. + * @return True if binding is still bound to the signal and has a listener. */ isBound(): boolean; /** * - * @return - If SignalBinding will only be executed once. + * @return If SignalBinding will only be executed once. */ isOnce(): boolean; /** * - * @return - Handler function bound to the signal. + * @return Handler function bound to the signal. */ getListener(): Function; /** * - * @return - Signal that listener is currently bound to. + * @return Signal that listener is currently bound to. */ getSignal(): Phaser.Signal; /** * - * @return - String representation of the object. + * @return String representation of the object. */ toString(): string; @@ -18042,8 +18042,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * A single Phaser Gamepad * - * @param game - Current game instance. - * @param padParent - The parent Phaser.Gamepad object (all gamepads reside under this) + * @param game Current game instance. + * @param padParent The parent Phaser.Gamepad object (all gamepads reside under this) */ constructor(game: Phaser.Game, padParent: any); @@ -18107,17 +18107,17 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Returns value of requested axis. * - * @param axisCode - The index of the axis to check - * @return - Axis value if available otherwise false + * @param axisCode The index of the axis to check + * @return Axis value if available otherwise false */ axis(axisCode: number): number; /** * Add callbacks to this Gamepad to handle connect / disconnect / button down / button up / axis change / float value buttons. * - * @param context - The context under which the callbacks are run. - * @param callbacks - Object that takes six different callbak methods: -onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCallback, onFloatCallback + * @param context The context under which the callbacks are run. + * @param callbacks Object that takes six different callbak methods: + * onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCallback, onFloatCallback */ addCallbacks(context: any, callbacks: any): void; @@ -18125,15 +18125,15 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Returns the value of a gamepad button. Intended mainly for cases when you have floating button values, for example * analog trigger buttons on the XBOX 360 controller. * - * @param buttonCode - The buttonCode of the button to check. - * @return - Button value if available otherwise null. Be careful as this can incorrectly evaluate to 0. + * @param buttonCode The buttonCode of the button to check. + * @return Button value if available otherwise null. Be careful as this can incorrectly evaluate to 0. */ buttonValue(buttonCode: number): number; /** * Gamepad connect function, should be called by Phaser.Gamepad. * - * @param rawPad - The raw gamepad object + * @param rawPad The raw gamepad object */ connect(rawPad: any): void; @@ -18151,42 +18151,42 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Gets a GamepadButton object from this controller to be stored and referenced locally. * The GamepadButton object can then be polled, have events attached to it, etc. * - * @param buttonCode - The buttonCode of the button, i.e. Phaser.Gamepad.BUTTON_0, Phaser.Gamepad.XBOX360_A, etc. - * @return - The GamepadButton object which you can store locally and reference directly. + * @param buttonCode The buttonCode of the button, i.e. Phaser.Gamepad.BUTTON_0, Phaser.Gamepad.XBOX360_A, etc. + * @return The GamepadButton object which you can store locally and reference directly. */ getButton(buttonCode: number): Phaser.GamepadButton; /** * Returns true if the button is pressed down. * - * @param buttonCode - The buttonCode of the button to check. - * @return - True if the button is pressed down. + * @param buttonCode The buttonCode of the button to check. + * @return True if the button is pressed down. */ isDown(buttonCode: number): boolean; /** * Returns true if the button is not currently pressed. * - * @param buttonCode - The buttonCode of the button to check. - * @return - True if the button is not currently pressed down. + * @param buttonCode The buttonCode of the button to check. + * @return True if the button is not currently pressed down. */ isUp(buttonCode: number): boolean; /** * Returns the "just pressed" state of a button from this gamepad. Just pressed is considered true if the button was pressed down within the duration given (default 250ms). * - * @param buttonCode - The buttonCode of the button to check for. - * @param duration - The duration below which the button is considered as being just pressed. - Default: 250 - * @return - True if the button is just pressed otherwise false. + * @param buttonCode The buttonCode of the button to check for. + * @param duration The duration below which the button is considered as being just pressed. - Default: 250 + * @return True if the button is just pressed otherwise false. */ justPressed(buttonCode: number, duration?: number): boolean; /** * Returns the "just released" state of a button from this gamepad. Just released is considered as being true if the button was released within the duration given (default 250ms). * - * @param buttonCode - The buttonCode of the button to check for. - * @param duration - The duration below which the button is considered as being just released. - Default: 250 - * @return - True if the button is just released otherwise false. + * @param buttonCode The buttonCode of the button to check for. + * @param duration The duration below which the button is considered as being just released. - Default: 250 + * @return True if the button is just released otherwise false. */ justReleased(buttonCode: number, duration?: number): boolean; @@ -18198,31 +18198,31 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Handles changes in axis. * - * @param axisState - State of the relevant axis + * @param axisState State of the relevant axis */ processAxisChange(axisState: any): void; /** * Handles button down press. * - * @param buttonCode - Which buttonCode of this button - * @param value - Button value + * @param buttonCode Which buttonCode of this button + * @param value Button value */ processButtonDown(buttonCode: number, value: any): void; /** * Handles buttons with floating values (like analog buttons that acts almost like an axis but still registers like a button) * - * @param buttonCode - Which buttonCode of this button - * @param value - Button value (will range somewhere between 0 and 1, but not specifically 0 or 1. + * @param buttonCode Which buttonCode of this button + * @param value Button value (will range somewhere between 0 and 1, but not specifically 0 or 1. */ processButtonFloat(buttonCode: number, value: any): void; /** * Handles button release. * - * @param buttonCode - Which buttonCode of this button - * @param value - Button value + * @param buttonCode Which buttonCode of this button + * @param value Button value */ processButtonUp(buttonCode: number, value: any): void; @@ -18243,10 +18243,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * The Sound class constructor. * - * @param game - Reference to the current game instance. - * @param key - Asset key for the sound. - * @param volume - Default value for the volume, between 0 and 1. - Default: 1 - * @param loop - Whether or not the sound will loop. - Default: false + * @param game Reference to the current game instance. + * @param key Asset key for the sound. + * @param volume Default value for the volume, between 0 and 1. - Default: 1 + * @param loop Whether or not the sound will loop. - Default: false */ constructor(game: Phaser.Game, key: string, volume?: number, loop?: boolean, connect?: boolean); @@ -18280,7 +18280,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Destroys this sound and all associated events and removes it from the SoundManager. * - * @param remove - If true this Sound is automatically removed from the SoundManager. - Default: true + * @param remove If true this Sound is automatically removed from the SoundManager. - Default: true */ destroy(remove?: boolean): void; @@ -18468,18 +18468,18 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Adds a marker into the current Sound. A marker is represented by a unique key and a start time and duration. * This allows you to bundle multiple sounds together into a single audio file and use markers to jump between them for playback. * - * @param name - A unique name for this marker, i.e. 'explosion', 'gunshot', etc. - * @param start - The start point of this marker in the audio file, given in seconds. 2.5 = 2500ms, 0.5 = 500ms, etc. - * @param duration - The duration of the marker in seconds. 2.5 = 2500ms, 0.5 = 500ms, etc. - * @param volume - The volume the sound will play back at, between 0 (silent) and 1 (full volume). - Default: 1 - * @param loop - Sets if the sound will loop or not. - Default: false + * @param name A unique name for this marker, i.e. 'explosion', 'gunshot', etc. + * @param start The start point of this marker in the audio file, given in seconds. 2.5 = 2500ms, 0.5 = 500ms, etc. + * @param duration The duration of the marker in seconds. 2.5 = 2500ms, 0.5 = 500ms, etc. + * @param volume The volume the sound will play back at, between 0 (silent) and 1 (full volume). - Default: 1 + * @param loop Sets if the sound will loop or not. - Default: false */ addMarker(name: string, start: number, duration: number, volume?: number, loop?: boolean): void; /** * Destroys this sound and all associated events and removes it from the SoundManager. * - * @param remove - If true this Sound is automatically removed from the SoundManager. - Default: true + * @param remove If true this Sound is automatically removed from the SoundManager. - Default: true */ destroy(): void; @@ -18489,8 +18489,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, * and the final volume (1) as the second parameter. * - * @param duration - The time in milliseconds over which the Sound should fade in. - Default: 1000 - * @param loop - Should the Sound be set to loop? Note that this doesn't cause the fade to repeat. - Default: false + * @param duration The time in milliseconds over which the Sound should fade in. - Default: 1000 + * @param loop Should the Sound be set to loop? Note that this doesn't cause the fade to repeat. - Default: false */ fadeIn(duration?: number, loop?: boolean): void; @@ -18499,7 +18499,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, * and the final volume (0) as the second parameter. * - * @param duration - The time in milliseconds over which the Sound should fade out. - Default: 1000 + * @param duration The time in milliseconds over which the Sound should fade out. - Default: 1000 */ fadeOut(duration?: number): void; @@ -18508,8 +18508,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * At the end of the fade Sound.onFadeComplete is dispatched with this Sound object as the first parameter, * and the final volume (volume) as the second parameter. * - * @param duration - The time in milliseconds during which the Sound should fade out. - Default: 1000 - * @param volume - The volume which the Sound should fade to. This is a value between 0 and 1. + * @param duration The time in milliseconds during which the Sound should fade out. - Default: 1000 + * @param volume The volume which the Sound should fade to. This is a value between 0 and 1. */ fadeTo(duration?: number, volume?: number): void; @@ -18521,29 +18521,29 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Play this sound, or a marked section of it. * - * @param marker - If you want to play a marker then give the key here, otherwise leave blank to play the full sound. - Default: '' - * @param position - The starting position to play the sound from - this is ignored if you provide a marker. - Default: 0 - * @param volume - Volume of the sound you want to play. If none is given it will use the volume given to the Sound when it was created (which defaults to 1 if none was specified). - Default: 1 - * @param loop - Loop when it finished playing? - Default: false - * @param forceRestart - If the sound is already playing you can set forceRestart to restart it from the beginning. - Default: true - * @return - This sound instance. + * @param marker If you want to play a marker then give the key here, otherwise leave blank to play the full sound. - Default: '' + * @param position The starting position to play the sound from - this is ignored if you provide a marker. - Default: 0 + * @param volume Volume of the sound you want to play. If none is given it will use the volume given to the Sound when it was created (which defaults to 1 if none was specified). - Default: 1 + * @param loop Loop when it finished playing? - Default: false + * @param forceRestart If the sound is already playing you can set forceRestart to restart it from the beginning. - Default: true + * @return This sound instance. */ play(marker?: string, position?: number, volume?: number, loop?: boolean, forceRestart?: boolean): Phaser.Sound; /** * Removes a marker from the sound. * - * @param name - The key of the marker to remove. + * @param name The key of the marker to remove. */ removeMarker(name: string): void; /** * Restart the sound, or a marked section of it. * - * @param marker - If you want to play a marker then give the key here, otherwise leave blank to play the full sound. - Default: '' - * @param position - The starting position to play the sound from - this is ignored if you provide a marker. - Default: 0 - * @param volume - Volume of the sound you want to play. - Default: 1 - * @param loop - Loop when it finished playing? - Default: false + * @param marker If you want to play a marker then give the key here, otherwise leave blank to play the full sound. - Default: '' + * @param position The starting position to play the sound from - this is ignored if you provide a marker. - Default: 0 + * @param volume Volume of the sound you want to play. - Default: 1 + * @param loop Loop when it finished playing? - Default: false */ restart(marker: string, position: number, volume?: number, loop?: boolean): void; @@ -18555,7 +18555,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Called automatically when this sound is unlocked. * - * @param key - The Phaser.Cache key of the sound file to check for decoding. + * @param key The Phaser.Cache key of the sound file to check for decoding. */ soundHasUnlocked(key: string): void; @@ -18595,7 +18595,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * of AudioContext nodes. If this is the case create a global var called PhaserGlobal on the window object before creating the game. The active * AudioContext will then be saved to window.PhaserGlobal.audioContext when the Phaser game is destroyed, and re-used when it starts again. * - * @param game - Reference to the current game instance. + * @param game Reference to the current game instance. */ constructor(game: Phaser.Game); @@ -18664,19 +18664,19 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Adds a new Sound into the SoundManager. * - * @param key - Asset key for the sound. - * @param volume - Default value for the volume. - Default: 1 - * @param loop - Whether or not the sound will loop. - Default: false - * @param connect - Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. - Default: true - * @return - The new sound instance. + * @param key Asset key for the sound. + * @param volume Default value for the volume. - Default: 1 + * @param loop Whether or not the sound will loop. - Default: false + * @param connect Controls if the created Sound object will connect to the master gainNode of the SoundManager when running under WebAudio. - Default: true + * @return The new sound instance. */ add(key: string, volume?: number, loop?: boolean, connect?: boolean): Phaser.Sound; /** * Adds a new AudioSprite into the SoundManager. * - * @param key - Asset key for the sound. - * @return - The new AudioSprite instance. + * @param key Asset key for the sound. + * @return The new AudioSprite instance. */ addSprite(key: string): Phaser.AudioSprite; @@ -18688,8 +18688,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Decode a sound by its assets key. * - * @param key - Assets key of the sound to be decoded. - * @param sound - Its buffer will be set to decoded data. + * @param key Assets key of the sound to be decoded. + * @param sound Its buffer will be set to decoded data. */ decode(key: string, sound?: Phaser.Sound): void; @@ -18706,18 +18706,18 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Adds a new Sound into the SoundManager and starts it playing. * - * @param key - Asset key for the sound. - * @param volume - Default value for the volume. - Default: 1 - * @param loop - Whether or not the sound will loop. - Default: false - * @return - The new sound instance. + * @param key Asset key for the sound. + * @param volume Default value for the volume. - Default: 1 + * @param loop Whether or not the sound will loop. - Default: false + * @return The new sound instance. */ play(key: string, volume?: number, loop?: boolean): Phaser.Sound; /** * Removes a Sound from the SoundManager. The removed Sound is destroyed before removal. * - * @param sound - The sound object to remove. - * @return - True if the sound was removed successfully, otherwise false. + * @param sound The sound object to remove. + * @return True if the sound was removed successfully, otherwise false. */ remove(sound: Phaser.Sound): boolean; @@ -18725,8 +18725,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Removes all Sounds from the SoundManager that have an asset key matching the given value. * The removed Sounds are destroyed before removal. * - * @param key - The key to match when removing sound objects. - * @return - The number of matching sound objects that were removed. + * @param key The key to match when removing sound objects. + * @return The number of matching sound objects that were removed. */ removeByKey(key: string): number; @@ -18770,11 +18770,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * They also contain additional properties allowing for physics motion (via Sprite.body), input handling (via Sprite.input), * events (via Sprite.events), animation (via Sprite.animations), camera culling and more. Please see the Examples for use cases. * - * @param game - A reference to the currently running game. - * @param x - The x coordinate (in world space) to position the Sprite at. - * @param y - The y coordinate (in world space) to position the Sprite at. - * @param key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. - * @param frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. + * @param game A reference to the currently running game. + * @param x The x coordinate (in world space) to position the Sprite at. + * @param y The y coordinate (in world space) to position the Sprite at. + * @param key This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. + * @param frame If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. */ constructor(game: Phaser.Game, x: number, y: number, key?: any, frame?: any); @@ -19014,7 +19014,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Brings the Sprite to the top of the display list it is a child of. Sprites that are members of a Phaser.Group are only * bought to the top of that Group, not the entire display list. - * @return - (Phaser.Sprite) This instance. + * @return (Phaser.Sprite) This instance. */ bringToTop(): Phaser.Sprite; @@ -19028,8 +19028,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The rectangle object given to this method can be either a Phaser.Rectangle or any object so long as it has public x, y, width and height properties. * A reference to the rectangle is stored in Sprite.cropRect unless the `copy` parameter is `true` in which case the values are duplicated to a local object. * - * @param rect - The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle. - * @param copy - If false Sprite.cropRect will be a reference to the given rect. If true it will copy the rect values into a local Sprite.cropRect object. - Default: false + * @param rect The Rectangle used during cropping. Pass null or no parameters to clear a previously set crop rectangle. + * @param copy If false Sprite.cropRect will be a reference to the given rect. If true it will copy the rect values into a local Sprite.cropRect object. - Default: false */ crop(rect: Phaser.Rectangle, copy: boolean): void; @@ -19037,8 +19037,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Damages the Sprite, this removes the given amount from the Sprites health property. * If health is then taken below or is equal to zero `Sprite.kill` is called. * - * @param amount - The amount to subtract from the Sprite.health value. - * @return - (Phaser.Sprite) This instance. + * @param amount The amount to subtract from the Sprite.health value. + * @return (Phaser.Sprite) This instance. */ damage(amount: number): Phaser.Sprite; @@ -19046,7 +19046,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Destroys the Sprite. This removes it from its parent group, destroys the input, event and animation handlers if present * and nulls its reference to game, freeing it up for garbage collection. * - * @param destroyChildren - Should every child of this object have its destroy method called? - Default: true + * @param destroyChildren Should every child of this object have its destroy method called? - Default: true */ destroy(destroyChildren?: boolean): void; drawPolygon(): void; @@ -19056,7 +19056,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * It will dispatch the onKilled event, you can listen to Sprite.events.onKilled for the signal. * Note that killing a Sprite is a way for you to quickly recycle it in a Sprite pool, it doesn't free it up from memory. * If you don't need this Sprite any more you should call Sprite.destroy instead. - * @return - (Phaser.Sprite) This instance. + * @return (Phaser.Sprite) This instance. */ kill(): Phaser.Sprite; @@ -19064,9 +19064,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Changes the Texture the Sprite is using entirely. The old texture is removed and the new one is referenced or fetched from the Cache. * This causes a WebGL texture update, so use sparingly or in low-intensity portions of your game. * - * @param key - This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. - * @param frame - If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. - * @param stopAnimation - If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing. - Default: true + * @param key This is the image or texture used by the Sprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. + * @param frame If this Sprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. + * @param stopAnimation If an animation is already playing on this Sprite you can choose to stop it or let it carry on playing. - Default: true */ loadTexture(key: any, frame: any, stopAnimation?: boolean): void; @@ -19075,8 +19075,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * This check ignores the Sprites hitArea property and runs a Sprite.getBounds comparison on both objects to determine the result. * Therefore it's relatively expensive to use in large quantities (i.e. with lots of Sprites at a high frequency), but should be fine for low-volume testing where physics isn't required. * - * @param displayObject - The display object to check against. - * @return - True if the bounds of this Sprite intersects at any point with the bounds of the given display object. + * @param displayObject The display object to check against. + * @return True if the bounds of this Sprite intersects at any point with the bounds of the given display object. */ overlap(displayObject: any): boolean; @@ -19084,11 +19084,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Play an animation based on the given key. The animation should previously have been added via sprite.animations.add() * If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. * - * @param name - The name of the animation to be played, e.g. "fire", "walk", "jump". - * @param frameRate - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. - Default: null - * @param loop - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. - Default: false - * @param killOnComplete - If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. - Default: false - * @return - A reference to playing Animation instance. + * @param name The name of the animation to be played, e.g. "fire", "walk", "jump". + * @param frameRate The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. - Default: null + * @param loop Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. - Default: false + * @param killOnComplete If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. - Default: false + * @return A reference to playing Animation instance. */ play(name: string, frameRate?: number, loop?: boolean, killOnComplete?: boolean): Phaser.Animation; @@ -19099,7 +19099,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Automatically called by World.preUpdate. - * @return - True if the Sprite was rendered, otherwise false. + * @return True if the Sprite was rendered, otherwise false. */ preUpdate(): void; @@ -19108,10 +19108,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state and health values. * If the Sprite has a physics body that too is reset. * - * @param x - The x coordinate (in world space) to position the Sprite at. - * @param y - The y coordinate (in world space) to position the Sprite at. - * @param health - The health to give the Sprite. - Default: 1 - * @return - (Phaser.Sprite) This instance. + * @param x The x coordinate (in world space) to position the Sprite at. + * @param y The y coordinate (in world space) to position the Sprite at. + * @param health The health to give the Sprite. - Default: 1 + * @return (Phaser.Sprite) This instance. */ reset(x: number, y: number, health?: number): Phaser.Sprite; @@ -19125,8 +19125,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * A resurrected Sprite has its alive, exists and visible properties all set to true. * It will dispatch the onRevived event, you can listen to Sprite.events.onRevived for the signal. * - * @param health - The health to give the Sprite. - Default: 1 - * @return - (Phaser.Sprite) This instance. + * @param health The health to give the Sprite. - Default: 1 + * @return (Phaser.Sprite) This instance. */ revive(health?: number): Phaser.Sprite; @@ -19134,7 +19134,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Sets the Texture frame the Sprite uses for rendering. * This is primarily an internal method used by Sprite.loadTexture, although you may call it directly. * - * @param frame - The Frame to be used by the Sprite texture. + * @param frame The Frame to be used by the Sprite texture. */ setFrame(frame: Phaser.Frame): void; @@ -19153,10 +19153,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Call setScaleMinMax(null) to clear both the scaleMin and scaleMax values. * - * @param minX - The minimum horizontal scale value this Sprite can scale down to. - * @param minY - The minimum vertical scale value this Sprite can scale down to. - * @param maxX - The maximum horizontal scale value this Sprite can scale up to. - * @param maxY - The maximum vertical scale value this Sprite can scale up to. + * @param minX The minimum horizontal scale value this Sprite can scale down to. + * @param minY The minimum vertical scale value this Sprite can scale down to. + * @param maxX The maximum horizontal scale value this Sprite can scale up to. + * @param maxY The maximum vertical scale value this Sprite can scale up to. */ setScaleMinMax(minX?: number, minY?: number, maxX?: number, maxY?: number): void; @@ -19190,10 +19190,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * 1000 sprites that all share the same texture (or texture atlas). It's also useful if running in Canvas mode and you have a lot of un-rotated or un-scaled * Sprites as it skips all of the Canvas setTransform calls, which helps performance, especially on mobile devices. * - * @param game - A reference to the currently running game. - * @param parent - The parent Group, DisplayObject or DisplayObjectContainer that this Group will be added to. If `undefined` or `null` it will use game.world. - * @param name - A name for this Group. Not used internally but useful for debugging. - Default: group - * @param addToStage - If set to true this Group will be added directly to the Game.Stage instead of Game.World. - Default: false + * @param game A reference to the currently running game. + * @param parent The parent Group, DisplayObject or DisplayObjectContainer that this Group will be added to. If `undefined` or `null` it will use game.world. + * @param name A name for this Group. Not used internally but useful for debugging. - Default: group + * @param addToStage If set to true this Group will be added directly to the Game.Stage instead of Game.World. - Default: false */ constructor(game: Phaser.Game, parent: any, name?: string, addedToStage?: boolean); @@ -19217,7 +19217,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The Stage controls root level display objects upon which everything is displayed. * It also handles browser visibility handling and the pausing due to loss of focus. * - * @param game - Game reference to the currently running game. + * @param game Game reference to the currently running game. */ constructor(game: Phaser.Game); @@ -19271,7 +19271,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Parses a Game configuration object. * - * @param config - The configuration object to parse. + * @param config The configuration object to parse. */ parseConfig(config: any): void; @@ -19305,7 +19305,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * This method is called when the document visibility is changed. * - * @param event - Its type will be used to decide whether the game should be paused or not. + * @param event Its type will be used to decide whether the game should be paused or not. */ visibilityChange(event: any): void; @@ -19352,9 +19352,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * The `width` and `height` constructor parameters can either be a number which represents pixels or a string that represents a percentage: e.g. `800` (for 800 pixels) or `"80%"` for 80%. * - * @param game - A reference to the currently running game. - * @param width - The width of the game. See above. - * @param height - The height of the game. See above. + * @param game A reference to the currently running game. + * @param width The width of the game. See above. + * @param height The height of the game. See above. */ constructor(game: Phaser.Game, width: number, height: number); @@ -19363,9 +19363,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * The `width` and `height` constructor parameters can either be a number which represents pixels or a string that represents a percentage: e.g. `800` (for 800 pixels) or `"80%"` for 80%. * - * @param game - A reference to the currently running game. - * @param width - The width of the game. See above. - * @param height - The height of the game. See above. + * @param game A reference to the currently running game. + * @param width The width of the game. See above. + * @param height The height of the game. See above. */ constructor(game: Phaser.Game, width: string, height: string); @@ -19825,7 +19825,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * dependent upon {@link Phaser.ScaleManager#forceLandscape forceLandscape} and {@link Phaser.ScaleManager#forcePortrait forcePortrait}, and updates the state. * * The appropriate event is dispatched if the orientation became valid or invalid. - * @return - True if the orientation state changed (consider a refresh) + * @return True if the orientation state changed (consider a refresh) */ checkOrientationState(): boolean; @@ -19848,8 +19848,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * This enables generation of incorrect orientation signals and affects resizing but does not otherwise rotate or lock the orientation. * - * @param forceLandscape - true if the game should run in landscape mode only. - * @param forcePortrait - true if the game should run in portrait mode only. - Default: false + * @param forceLandscape true if the game should run in landscape mode only. + * @param forcePortrait true if the game should run in portrait mode only. - Default: false */ forceOrientation(forceLandscape: boolean, forcePortrait?: boolean): void; @@ -19864,15 +19864,15 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Values are rounded to the nearest pixel. * - * @param target - The rectangle to update; a new one is created as needed. - Default: (new Rectangle) - * @return - The established parent bounds. + * @param target The rectangle to update; a new one is created as needed. - Default: (new Rectangle) + * @return The established parent bounds. */ getParentBounds(target?: Rectangle): Rectangle; /** * Load configuration settings. * - * @param config - The game configuration object. + * @param config The game configuration object. */ parseConfig(config: any): void; @@ -19915,8 +19915,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * - Size of Canvas's parent element or CSS rules such as min-height/max-height; * - The size of the Window * - * @param width - _Game width_, in pixels. - * @param height - _Game height_, in pixels. + * @param width _Game width_, in pixels. + * @param height _Game height_, in pixels. */ setGameSize(width: number, height: number): void; @@ -19935,8 +19935,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * See {@link Phaser.ScaleManager#onSizeChange onSizeChange} for a better way of reacting to layout updates. * - * @param callback - The callback that will be called each time a window.resize event happens or if set, the parent container resizes. - * @param context - The context in which the callback will be called. + * @param callback The callback that will be called each time a window.resize event happens or if set, the parent container resizes. + * @param context The context in which the callback will be called. */ setResizeCallback(callback: ResizeCallback, context: any): void; @@ -19950,10 +19950,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * This method can be used in the {@link Phaser.ScaleManager#setResizeCallback resize callback}. * - * @param hScale - Horizontal scaling factor. - * @param vScale - Vertical scaling factor. - * @param hTrim - Horizontal trim, applied after scaling. - Default: 0 - * @param vTrim - Vertical trim, applied after scaling. - Default: 0 + * @param hScale Horizontal scaling factor. + * @param vScale Vertical scaling factor. + * @param hTrim Horizontal trim, applied after scaling. - Default: 0 + * @param vTrim Vertical trim, applied after scaling. - Default: 0 */ setUserScale(hScale: number, vScale: number, hTrim?: number, vTrim?: number): void; @@ -19964,10 +19964,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * - When the device is not in an incorrect orientation; or * - The scale mode is EXACT_FIT when not in fullscreen * - * @param minWidth - The minimum width the game is allowed to scale down to. - * @param minHeight - The minimum height the game is allowed to scale down to. - * @param maxWidth - The maximum width the game is allowed to scale up to; only changed if specified. - * @param maxHeight - The maximum height the game is allowed to scale up to; only changed if specified. + * @param minWidth The minimum width the game is allowed to scale down to. + * @param minHeight The minimum height the game is allowed to scale down to. + * @param maxWidth The maximum width the game is allowed to scale up to; only changed if specified. + * @param maxHeight The maximum height the game is allowed to scale up to; only changed if specified. */ setMinMax(minWidth: number, minHeight: number, maxWidth?: number, maxHeight?: number): void; @@ -19976,8 +19976,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * This should _not_ be called when in fullscreen mode. * - * @param width - The width of the game. - * @param height - The height of the game. + * @param width The width of the game. + * @param height The height of the game. */ setupScale(width: number, height: number): void; @@ -19986,8 +19986,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * This should _not_ be called when in fullscreen mode. * - * @param width - The width of the game. - * @param height - The height of the game. + * @param width The width of the game. + * @param height The height of the game. */ setupScale(width: string, height: string): void; @@ -19998,11 +19998,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * sprite until it fills the given values. Note that with letterBox set to false the scaled sprite may spill out over either * the horizontal or vertical sides of the target dimensions. If you wish to stop this you can crop the Sprite. * - * @param sprite - The sprite we want to scale. - * @param width - The target width that we want to fit the sprite in to. If not given it defaults to ScaleManager.width. - * @param height - The target height that we want to fit the sprite in to. If not given it defaults to ScaleManager.height. - * @param letterBox - True if we want the `fitted` mode. Otherwise, the function uses the `zoom` mode. - Default: false - * @return - The scaled sprite. + * @param sprite The sprite we want to scale. + * @param width The target width that we want to fit the sprite in to. If not given it defaults to ScaleManager.width. + * @param height The target height that we want to fit the sprite in to. If not given it defaults to ScaleManager.height. + * @param letterBox True if we want the `fitted` mode. Otherwise, the function uses the `zoom` mode. - Default: false + * @return The scaled sprite. */ scaleSprite(sprite: Sprite, width?: number, height?: number, letterBox?: boolean): Sprite; @@ -20013,11 +20013,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * sprite until it fills the given values. Note that with letterBox set to false the scaled sprite may spill out over either * the horizontal or vertical sides of the target dimensions. If you wish to stop this you can crop the Sprite. * - * @param sprite - The sprite we want to scale. - * @param width - The target width that we want to fit the sprite in to. If not given it defaults to ScaleManager.width. - * @param height - The target height that we want to fit the sprite in to. If not given it defaults to ScaleManager.height. - * @param letterBox - True if we want the `fitted` mode. Otherwise, the function uses the `zoom` mode. - Default: false - * @return - The scaled sprite. + * @param sprite The sprite we want to scale. + * @param width The target width that we want to fit the sprite in to. If not given it defaults to ScaleManager.width. + * @param height The target height that we want to fit the sprite in to. If not given it defaults to ScaleManager.height. + * @param letterBox True if we want the `fitted` mode. Otherwise, the function uses the `zoom` mode. - Default: false + * @return The scaled sprite. */ scaleSprite(sprite: Image, width?: number, height?: number, letterBox?: boolean): Sprite; @@ -20030,15 +20030,15 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * The {@link Phaser.ScaleManager#fullScreenFailed fullScreenFailed} signal will be dispatched if the fullscreen change request failed or the game does not support the Fullscreen API. * - * @param antialias - Changes the anti-alias feature of the canvas before jumping in to fullscreen (false = retain pixel art, true = smooth art). If not specified then no change is made. Only works in CANVAS mode. - * @param allowTrampoline - Internal argument. If `false` click trampolining is suppressed. - Default: undefined - * @return - Returns true if the device supports fullscreen mode and fullscreen mode was attempted to be started. (It might not actually start, wait for the signals.) + * @param antialias Changes the anti-alias feature of the canvas before jumping in to fullscreen (false = retain pixel art, true = smooth art). If not specified then no change is made. Only works in CANVAS mode. + * @param allowTrampoline Internal argument. If `false` click trampolining is suppressed. - Default: undefined + * @return Returns true if the device supports fullscreen mode and fullscreen mode was attempted to be started. (It might not actually start, wait for the signals.) */ startFullScreen(antialias?: boolean, allowTrampoline?: boolean): boolean; /** * Stops / exits fullscreen mode, if active. - * @return - Returns true if the browser supports fullscreen mode and fullscreen mode will be exited. + * @return Returns true if the browser supports fullscreen mode and fullscreen mode will be exited. */ stopFullScreen(): boolean; @@ -20097,17 +20097,17 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Calibrates element coordinates for `inViewport` checks. * - * @param coords - An object containing the following properties: `{top: number, right: number, bottom: number, left: number}` - * @param cushion - A value to adjust the coordinates by. - * @return - The calibrated element coordinates + * @param coords An object containing the following properties: `{top: number, right: number, bottom: number, left: number}` + * @param cushion A value to adjust the coordinates by. + * @return The calibrated element coordinates */ static calibrate(coords: any, cushion?: number): any; /** * Get the Visual viewport aspect ratio (or the aspect ratio of an object or element) * - * @param object - The object to determine the aspect ratio for. Must have public `width` and `height` properties or methods. - Default: (visualViewport) - * @return - The aspect ratio. + * @param object The object to determine the aspect ratio for. Must have public `width` and `height` properties or methods. - Default: (visualViewport) + * @return The aspect ratio. */ static getAspectRatio(object: any): number; @@ -20132,7 +20132,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * - http://stackoverflow.com/questions/4917664/detect-viewport-orientation * - http://www.matthewgifford.com/blog/2011/12/22/a-misconception-about-window-orientation * - * @param primaryFallback - Specify 'screen', 'viewport', or 'window.orientation'. - Default: (none) + * @param primaryFallback Specify 'screen', 'viewport', or 'window.orientation'. - Default: (none) */ static getScreenOrientation(primaryFallback?: string): string; @@ -20144,9 +20144,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The cushion parameter is an amount of pixels (+/-) to cushion the element. * It adjusts the measurements such that it is possible to detect when an element is near the viewport. * - * @param element - The element or stack (uses first item) to get the bounds for. - * @param cushion - A +/- pixel adjustment amount. - * @return - A plain object containing the properties `top/bottom/left/right/width/height` or `false` if a non-valid element is given. + * @param element The element or stack (uses first item) to get the bounds for. + * @param cushion A +/- pixel adjustment amount. + * @return A plain object containing the properties `top/bottom/left/right/width/height` or `false` if a non-valid element is given. */ static getBounds(element: any, cushion?: number): any; @@ -20155,9 +20155,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * The value may vary slightly as the page is scrolled due to rounding errors. * - * @param element - The targeted element that we want to retrieve the offset. - * @param point - The point we want to take the x/y values of the offset. - * @return - - A point objet with the offsetX and Y as its properties. + * @param element The targeted element that we want to retrieve the offset. + * @param point The point we want to take the x/y values of the offset. + * @return - A point objet with the offsetX and Y as its properties. */ static getOffset(element: any, point?: Point): Point; static inLayoutViewport(element: any, cushion?: number): boolean; @@ -20333,8 +20333,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * The State Manager is responsible for loading, setting up and switching game states. * - * @param game - A reference to the currently running game. - * @param pendingState - A State object to seed the manager with. - Default: null + * @param game A reference to the currently running game. + * @param pendingState A State object to seed the manager with. - Default: null */ constructor(game: Phaser.Game, pendingState?: Phaser.State); @@ -20425,17 +20425,17 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The State can be either a Phaser.State object (or an object that extends it), a plain JavaScript object or a function. * If a function is given a new state object will be created by calling it. * - * @param key - A unique key you use to reference this state, i.e. "MainMenu", "Level1". - * @param state - The state you want to switch to. - * @param autoStart - If true the State will be started immediately after adding it. - Default: false + * @param key A unique key you use to reference this state, i.e. "MainMenu", "Level1". + * @param state The state you want to switch to. + * @param autoStart If true the State will be started immediately after adding it. - Default: false */ add(key: string, state: any, autoStart?: boolean): void; /** * Checks if a given phaser state is valid. A State is considered valid if it has at least one of the core functions: preload, create, update or render. * - * @param key - The key of the state you want to check. - * @return - true if the State has the required functions, otherwise false. + * @param key The key of the state you want to check. + * @return true if the State has the required functions, otherwise false. */ checkState(key: string): boolean; @@ -20453,14 +20453,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Gets the current State. - * @return - Phaser.State + * @return Phaser.State */ getCurrentState(): Phaser.State; /** * Links game properties to the State given by the key. * - * @param key - State key. + * @param key State key. */ link(key: string): void; loadComplete(): void; @@ -20469,7 +20469,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * * - * @param elapsedTime - The time elapsed since the last update. + * @param elapsedTime The time elapsed since the last update. */ preRender(elapsedTime: number): void; @@ -20482,7 +20482,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Delete the given state. * - * @param key - A unique key you use to reference this state, i.e. "MainMenu", "Level1". + * @param key A unique key you use to reference this state, i.e. "MainMenu", "Level1". */ remove(key: string): void; resume(): void; @@ -20490,9 +20490,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Restarts the current State. State.shutDown will be called (if it exists) before the State is restarted. * - * @param clearWorld - Clear everything in the world? This clears the World display list fully (but not the Stage, so if you've added your own objects to the Stage they will need managing directly) - Default: true - * @param clearCache - Clear the Game.Cache? This purges out all loaded assets. The default is false and you must have clearWorld=true if you want to clearCache as well. - Default: false - * @param args - Additional parameters that will be passed to the State.init function if it has one. + * @param clearWorld Clear everything in the world? This clears the World display list fully (but not the Stage, so if you've added your own objects to the Stage they will need managing directly) - Default: true + * @param clearCache Clear the Game.Cache? This purges out all loaded assets. The default is false and you must have clearWorld=true if you want to clearCache as well. - Default: false + * @param args Additional parameters that will be passed to the State.init function if it has one. */ restart(clearWorld?: boolean, clearCache?: boolean): void; resize(width: number, height: number): void; @@ -20500,10 +20500,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Start the given State. If a State is already running then State.shutDown will be called (if it exists) before switching to the new State. * - * @param key - The key of the state you want to start. - * @param clearWorld - Clear everything in the world? This clears the World display list fully (but not the Stage, so if you've added your own objects to the Stage they will need managing directly) - Default: true - * @param clearCache - Clear the Game.Cache? This purges out all loaded assets. The default is false and you must have clearWorld=true if you want to clearCache as well. - Default: false - * @param args - Additional parameters that will be passed to the State.init function (if it has one). + * @param key The key of the state you want to start. + * @param clearWorld Clear everything in the world? This clears the World display list fully (but not the Stage, so if you've added your own objects to the Stage they will need managing directly) - Default: true + * @param clearCache Clear the Game.Cache? This purges out all loaded assets. The default is false and you must have clearWorld=true if you want to clearCache as well. - Default: false + * @param args Additional parameters that will be passed to the State.init function (if it has one). */ start(key: string, clearWorld?: boolean, clearCache?: boolean, ...args: any[]): void; update(): void; @@ -20511,7 +20511,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Nulls all State level Phaser properties, including a reference to Game. * - * @param key - State key. + * @param key State key. */ unlink(key: string): void; @@ -20531,11 +20531,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Because of this you can only display fonts that are currently loaded and available to the browser. It won't load the fonts for you. * Here is a compatibility table showing the available default fonts across different mobile browsers: http://www.jordanm.co.uk/tinytype * - * @param game - Current game instance. - * @param x - X position of the new text object. - * @param y - Y position of the new text object. - * @param text - The actual text that will be written. - * @param style - The style object containing style attributes like font, font size, etc. + * @param game Current game instance. + * @param x X position of the new text object. + * @param y Y position of the new text object. + * @param text The actual text that will be written. + * @param style The style object containing style attributes like font, font size, etc. */ constructor(game: Phaser.Game, x: number, y: number, text: string, style: any); @@ -20709,8 +20709,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Once set the color remains in use until either another color or the end of the string is encountered. * For example if the Text was `Photon Storm` and you did `Text.addColor('#ffff00', 6)` it would color in the word `Storm` in yellow. * - * @param color - A canvas fillstyle that will be used on the text eg `red`, `#00FF00`, `rgba()`. - * @param position - The index of the character in the string to start applying this color value from. + * @param color A canvas fillstyle that will be used on the text eg `red`, `#00FF00`, `rgba()`. + * @param position The index of the character in the string to start applying this color value from. */ addColor(color: string, position: number): void; @@ -20722,7 +20722,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * * - * @param destroyChildren - Should every child of this object have its destroy method called? - Default: true + * @param destroyChildren Should every child of this object have its destroy method called? - Default: true */ destroy(destroyChildren?: boolean): void; @@ -20742,24 +20742,24 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The blur is the strength of the shadow. A value of zero means a hard shadow, a value of 10 means a very soft shadow. * To remove a shadow already in place you can call this method with no parameters set. * - * @param x - The shadowOffsetX value in pixels. This is how far offset horizontally the shadow effect will be. - Default: 0 - * @param y - The shadowOffsetY value in pixels. This is how far offset vertically the shadow effect will be. - Default: 0 - * @param color - The color of the shadow, as given in CSS rgba or hex format. Set the alpha component to 0 to disable the shadow. - Default: 'rgba(0,0,0,1)' - * @param blur - The shadowBlur value. Make the shadow softer by applying a Gaussian blur to it. A number from 0 (no blur) up to approx. 10 (depending on scene). - Default: 0 + * @param x The shadowOffsetX value in pixels. This is how far offset horizontally the shadow effect will be. - Default: 0 + * @param y The shadowOffsetY value in pixels. This is how far offset vertically the shadow effect will be. - Default: 0 + * @param color The color of the shadow, as given in CSS rgba or hex format. Set the alpha component to 0 to disable the shadow. - Default: 'rgba(0,0,0,1)' + * @param blur The shadowBlur value. Make the shadow softer by applying a Gaussian blur to it. A number from 0 (no blur) up to approx. 10 (depending on scene). - Default: 0 */ setShadow(x?: number, y?: number, color?: any, blur?: number): void; /** * Set the style of the text by passing a single style object to it. * - * @param style - The style properties to be set on the Text. - * @param style.font - The style and size of the font. - Default: 'bold 20pt Arial' - * @param style.fill - A canvas fillstyle that will be used on the text eg 'red', '#00FF00'. - Default: 'black' - * @param style.align - Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text. - Default: 'left' - * @param style.stroke - A canvas stroke style that will be used on the text stroke eg 'blue', '#FCFF00'. - Default: 'black' - * @param style.strokeThickness - A number that represents the thickness of the stroke. Default is 0 (no stroke). - Default: 0 - * @param style.wordWrap - Indicates if word wrap should be used. - Default: false - * @param style.wordWrapWidth - The width in pixels at which text will wrap. - Default: 100 + * @param style The style properties to be set on the Text. + * @param style.font The style and size of the font. - Default: 'bold 20pt Arial' + * @param style.fill A canvas fillstyle that will be used on the text eg 'red', '#00FF00'. - Default: 'black' + * @param style.align Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text. - Default: 'left' + * @param style.stroke A canvas stroke style that will be used on the text stroke eg 'blue', '#FCFF00'. - Default: 'black' + * @param style.strokeThickness A number that represents the thickness of the stroke. Default is 0 (no stroke). - Default: 0 + * @param style.wordWrap Indicates if word wrap should be used. - Default: false + * @param style.wordWrapWidth The width in pixels at which text will wrap. - Default: 100 */ setStyle(style?: { font?: string; fill?: any; align?: string; stroke?: string; strokeThickness?: number; wordWrap?: boolean; wordWrapWidth?: number; shadowOffsetX?: number; shadowOffsetY?: number; shadowColor?: string; shadowBlur?: number; }): void; @@ -20790,12 +20790,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * A Tile is a representation of a single tile within the Tilemap. * - * @param layer - The layer in the Tilemap data that this tile belongs to. - * @param index - The index of this tile type in the core map data. - * @param x - The x coordinate of this tile. - * @param y - The y coordinate of this tile. - * @param width - Width of the tile. - * @param height - Height of the tile. + * @param layer The layer in the Tilemap data that this tile belongs to. + * @param index The index of this tile type in the core map data. + * @param x The x coordinate of this tile. + * @param y The y coordinate of this tile. + * @param width Width of the tile. + * @param height Height of the tile. */ constructor(layer: any, index: number, x: number, y: Number, width: number, height: number);// @@ -20958,16 +20958,16 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Copies the tile data and properties from the given tile to this tile. * - * @param tile - The tile to copy from. + * @param tile The tile to copy from. */ copy(tile: Phaser.Tile): Phaser.Tile; /** * Check if the given x and y world coordinates are within this Tile. * - * @param x - The x coordinate to test. - * @param y - The y coordinate to test. - * @return - True if the coordinates are within this Tile, otherwise false. + * @param x The x coordinate to test. + * @param y The y coordinate to test. + * @return True if the coordinates are within this Tile, otherwise false. */ containsPoint(x: number, y: number): boolean; @@ -20979,10 +20979,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Check for intersection with this tile. * - * @param x - The x axis in pixels. - * @param y - The y axis in pixels. - * @param right - The right point. - * @param bottom - The bottom point. + * @param x The x axis in pixels. + * @param y The y axis in pixels. + * @param right The right point. + * @param bottom The bottom point. */ intersects(x: number, y: number, right: number, bottom: number): boolean; isInterested(collides: boolean, faces: boolean): boolean; @@ -20995,10 +20995,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Sets the collision flags for each side of this tile and updates the interesting faces list. * - * @param left - Indicating collide with any object on the left. - * @param right - Indicating collide with any object on the right. - * @param up - Indicating collide with any object on the top. - * @param down - Indicating collide with any object on the bottom. + * @param left Indicating collide with any object on the left. + * @param right Indicating collide with any object on the right. + * @param up Indicating collide with any object on the top. + * @param down Indicating collide with any object on the bottom. */ setCollision(left: boolean, right: boolean, up: boolean, down: boolean): void; @@ -21006,8 +21006,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Set a callback to be called when this tile is hit by an object. * The callback must true true for collision processing to take place. * - * @param callback - Callback function. - * @param context - Callback will be called within this context. + * @param callback Callback function. + * @param context Callback will be called within this context. */ setCollisionCallback(callback: Function, context: any): void; @@ -21035,12 +21035,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * A Tile map is rendered to the display using a TilemapLayer. It is not added to the display list directly itself. * A map may have multiple layers. You can perform operations on the map data such as copying, pasting, filling and shuffling the tiles around. * - * @param game - Game reference to the currently running game. - * @param key - The key of the tilemap data as stored in the Cache. If you're creating a blank map either leave this parameter out or pass `null`. - * @param tileWidth - The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. - Default: 32 - * @param tileHeight - The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. - Default: 32 - * @param width - The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. - Default: 10 - * @param height - The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. - Default: 10 + * @param game Game reference to the currently running game. + * @param key The key of the tilemap data as stored in the Cache. If you're creating a blank map either leave this parameter out or pass `null`. + * @param tileWidth The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. - Default: 32 + * @param tileHeight The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. - Default: 32 + * @param width The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. - Default: 10 + * @param height The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. - Default: 10 */ constructor(game: Phaser.Game, key?: string, tileWidth?: number, tileHeight?: number, width?: number, height?: number); @@ -21167,59 +21167,59 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Adds an image to the map to be used as a tileset. A single map may use multiple tilesets. * Note that the tileset name can be found in the JSON file exported from Tiled, or in the Tiled editor. * - * @param tileset - The name of the tileset as specified in the map data. - * @param key - The key of the Phaser.Cache image used for this tileset. If not specified it will look for an image with a key matching the tileset parameter. - * @param tileWidth - The width of the tiles in the Tileset Image. If not given it will default to the map.tileWidth value, if that isn't set then 32. - Default: 32 - * @param tileHeight - The height of the tiles in the Tileset Image. If not given it will default to the map.tileHeight value, if that isn't set then 32. - Default: 32 - * @param tileMargin - The width of the tiles in the Tileset Image. If not given it will default to the map.tileWidth value. - Default: 0 - * @param tileSpacing - The height of the tiles in the Tileset Image. If not given it will default to the map.tileHeight value. - Default: 0 - * @param gid - If adding multiple tilesets to a blank/dynamic map, specify the starting GID the set will use here. - Default: 0 - * @return - Returns the Tileset object that was created or updated, or null if it failed. + * @param tileset The name of the tileset as specified in the map data. + * @param key The key of the Phaser.Cache image used for this tileset. If not specified it will look for an image with a key matching the tileset parameter. + * @param tileWidth The width of the tiles in the Tileset Image. If not given it will default to the map.tileWidth value, if that isn't set then 32. - Default: 32 + * @param tileHeight The height of the tiles in the Tileset Image. If not given it will default to the map.tileHeight value, if that isn't set then 32. - Default: 32 + * @param tileMargin The width of the tiles in the Tileset Image. If not given it will default to the map.tileWidth value. - Default: 0 + * @param tileSpacing The height of the tiles in the Tileset Image. If not given it will default to the map.tileHeight value. - Default: 0 + * @param gid If adding multiple tilesets to a blank/dynamic map, specify the starting GID the set will use here. - Default: 0 + * @return Returns the Tileset object that was created or updated, or null if it failed. */ addTilesetImage(tileset: string, key?: string, tileWidth?: number, tileHeight?: number, tileMargin?: number, tileSpacing?: number, gid?: number): Phaser.Tileset; /** * Internal function. * - * @param layer - The index of the TilemapLayer to operate on. + * @param layer The index of the TilemapLayer to operate on. */ calculateFaces(layer: number): void; /** * Copies all of the tiles in the given rectangular block into the tilemap data buffer. * - * @param x - X position of the top left of the area to copy (given in tiles, not pixels) - * @param y - Y position of the top left of the area to copy (given in tiles, not pixels) - * @param width - The width of the area to copy (given in tiles, not pixels) - * @param height - The height of the area to copy (given in tiles, not pixels) - * @param layer - The layer to copy the tiles from. - * @return - An array of the tiles that were copied. + * @param x X position of the top left of the area to copy (given in tiles, not pixels) + * @param y Y position of the top left of the area to copy (given in tiles, not pixels) + * @param width The width of the area to copy (given in tiles, not pixels) + * @param height The height of the area to copy (given in tiles, not pixels) + * @param layer The layer to copy the tiles from. + * @return An array of the tiles that were copied. */ copy(x: number, y: number, width: number, height: number, layer?: any): Phaser.Tile[]; /** * Creates an empty map of the given dimensions and one blank layer. If layers already exist they are erased. * - * @param name - The name of the default layer of the map. - * @param width - The width of the map in tiles. - * @param height - The height of the map in tiles. - * @param tileWidth - The width of the tiles the map uses for calculations. - * @param tileHeight - The height of the tiles the map uses for calculations. - * @param group - Optional Group to add the layer to. If not specified it will be added to the World group. - * @return - The TilemapLayer object. This is an extension of Phaser.Image and can be moved around the display list accordingly. + * @param name The name of the default layer of the map. + * @param width The width of the map in tiles. + * @param height The height of the map in tiles. + * @param tileWidth The width of the tiles the map uses for calculations. + * @param tileHeight The height of the tiles the map uses for calculations. + * @param group Optional Group to add the layer to. If not specified it will be added to the World group. + * @return The TilemapLayer object. This is an extension of Phaser.Image and can be moved around the display list accordingly. */ create(name: string, width: number, height: number, tileWidth: number, tileHeight: number, group?: Phaser.Group): Phaser.TilemapLayer; /** * Creates a new and empty layer on this Tilemap. By default TilemapLayers are fixed to the camera. * - * @param name - The name of this layer. Must be unique within the map. - * @param width - The width of the layer in tiles. - * @param height - The height of the layer in tiles. - * @param tileWidth - The width of the tiles the layer uses for calculations. - * @param tileHeight - The height of the tiles the layer uses for calculations. - * @param group - Optional Group to add the layer to. If not specified it will be added to the World group. - * @return - The TilemapLayer object. This is an extension of Phaser.Image and can be moved around the display list accordingly. + * @param name The name of this layer. Must be unique within the map. + * @param width The width of the layer in tiles. + * @param height The height of the layer in tiles. + * @param tileWidth The width of the tiles the layer uses for calculations. + * @param tileHeight The height of the tiles the layer uses for calculations. + * @param group Optional Group to add the layer to. If not specified it will be added to the World group. + * @return The TilemapLayer object. This is an extension of Phaser.Image and can be moved around the display list accordingly. */ createBlankLayer(name: string, width: number, height: number, tileWidth: number, tileHeight: number, group?: Phaser.Group): Phaser.TilemapLayer; @@ -21229,15 +21229,15 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * configure Sprite properties from within the map editor. For example giving an object a property of alpha: 0.5 in the map editor will duplicate that when the * Sprite is created. You could also give it a value like: body.velocity.x: 100 to set it moving automatically. * - * @param name - The name of the Object Group to create Sprites from. - * @param gid - The layer array index value, or if a string is given the layer name within the map data. - * @param key - The Game.cache key of the image that this Sprite will use. - * @param frame - If the Sprite image contains multiple frames you can specify which one to use here. - * @param exists - The default exists state of the Sprite. - Default: true - * @param autoCull - The default autoCull state of the Sprite. Sprites that are autoCulled are culled from the camera if out of its range. - Default: false - * @param group - Group to add the Sprite to. If not specified it will be added to the World group. - Default: Phaser.World - * @param CustomClass - If you wish to create your own class, rather than Phaser.Sprite, pass the class here. Your class must extend Phaser.Sprite and have the same constructor parameters. - Default: Phaser.Sprite - * @param adjustY - By default the Tiled map editor uses a bottom-left coordinate system. Phaser uses top-left. So most objects will appear too low down. This parameter moves them up by their height. - Default: true + * @param name The name of the Object Group to create Sprites from. + * @param gid The layer array index value, or if a string is given the layer name within the map data. + * @param key The Game.cache key of the image that this Sprite will use. + * @param frame If the Sprite image contains multiple frames you can specify which one to use here. + * @param exists The default exists state of the Sprite. - Default: true + * @param autoCull The default autoCull state of the Sprite. Sprites that are autoCulled are culled from the camera if out of its range. - Default: false + * @param group Group to add the Sprite to. If not specified it will be added to the World group. - Default: Phaser.World + * @param CustomClass If you wish to create your own class, rather than Phaser.Sprite, pass the class here. Your class must extend Phaser.Sprite and have the same constructor parameters. - Default: Phaser.Sprite + * @param adjustY By default the Tiled map editor uses a bottom-left coordinate system. Phaser uses top-left. So most objects will appear too low down. This parameter moves them up by their height. - Default: true */ createFromObjects(name: string, gid: number, key: string, frame?: any, exists?: boolean, autoCull?: boolean, group?: Phaser.Group, CustomClass?: any, adjustY?: boolean): void; @@ -21247,13 +21247,13 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * You can optional specify if the tile will be replaced with another after the Sprite is created. This is useful if you want to lay down special * tiles in a level that are converted to Sprites, but want to replace the tile itself with a floor tile or similar once converted. * - * @param tiles - The tile index, or array of indexes, to create Sprites from. - * @param replacements - The tile index, or array of indexes, to change a converted tile to. Set to `null` to not change. - * @param key - The Game.cache key of the image that this Sprite will use. - * @param group - Group to add the Sprite to. If not specified it will be added to the World group. - Default: Phaser.World - * @param properties - An object that contains the default properties for your newly created Sprite. This object will be iterated and any matching Sprite property will be set. - * @param layer - The layer to operate on. - * @return - The number of Sprites that were created. + * @param tiles The tile index, or array of indexes, to create Sprites from. + * @param replacements The tile index, or array of indexes, to change a converted tile to. Set to `null` to not change. + * @param key The Game.cache key of the image that this Sprite will use. + * @param group Group to add the Sprite to. If not specified it will be added to the World group. - Default: Phaser.World + * @param properties An object that contains the default properties for your newly created Sprite. This object will be iterated and any matching Sprite property will be set. + * @param layer The layer to operate on. + * @return The number of Sprites that were created. */ createFromTiles(tiles: any, replacements: any, key: string, layer?: any, group?: Phaser.Group, properties?: any): number; @@ -21263,11 +21263,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Or you can open the JSON file it exports and look at the layers[].name value. Either way it must match. * If you wish to create a blank layer to put your own tiles on then see Tilemap.createBlankLayer. * - * @param layer - The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents. - * @param width - The rendered width of the layer, should never be wider than Game.width. If not given it will be set to Game.width. - * @param height - The rendered height of the layer, should never be wider than Game.height. If not given it will be set to Game.height. - * @param group - Optional Group to add the object to. If not specified it will be added to the World group. - * @return - The TilemapLayer object. This is an extension of Phaser.Sprite and can be moved around the display list accordingly. + * @param layer The layer array index value, or if a string is given the layer name, within the map data that this TilemapLayer represents. + * @param width The rendered width of the layer, should never be wider than Game.width. If not given it will be set to Game.width. + * @param height The rendered height of the layer, should never be wider than Game.height. If not given it will be set to Game.height. + * @param group Optional Group to add the object to. If not specified it will be added to the World group. + * @return The TilemapLayer object. This is an extension of Phaser.Sprite and can be moved around the display list accordingly. */ createLayer(layer: any, width?: number, height?: number, group?: Phaser.Group): Phaser.TilemapLayer; @@ -21285,77 +21285,77 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Fills the given area with the specified tile. * - * @param index - The index of the tile that the area will be filled with. - * @param x - X position of the top left of the area to operate one, given in tiles, not pixels. - * @param y - Y position of the top left of the area to operate one, given in tiles, not pixels. - * @param width - The width in tiles of the area to operate on. - * @param height - The height in tiles of the area to operate on. - * @param layer - The layer to operate on. + * @param index The index of the tile that the area will be filled with. + * @param x X position of the top left of the area to operate one, given in tiles, not pixels. + * @param y Y position of the top left of the area to operate one, given in tiles, not pixels. + * @param width The width in tiles of the area to operate on. + * @param height The height in tiles of the area to operate on. + * @param layer The layer to operate on. */ fill(index: number, x: number, y: number, width: number, height: number, layer?: any): void; /** * For each tile in the given area defined by x/y and width/height run the given callback. * - * @param callback - The callback. Each tile in the given area will be passed to this callback as the first and only parameter. - * @param context - The context under which the callback should be run. - * @param x - X position of the top left of the area to operate one, given in tiles, not pixels. - * @param y - Y position of the top left of the area to operate one, given in tiles, not pixels. - * @param width - The width in tiles of the area to operate on. - * @param height - The height in tiles of the area to operate on. - * @param layer - The layer to operate on. + * @param callback The callback. Each tile in the given area will be passed to this callback as the first and only parameter. + * @param context The context under which the callback should be run. + * @param x X position of the top left of the area to operate one, given in tiles, not pixels. + * @param y Y position of the top left of the area to operate one, given in tiles, not pixels. + * @param width The width in tiles of the area to operate on. + * @param height The height in tiles of the area to operate on. + * @param layer The layer to operate on. */ forEach(callback: Function, context: any, x: number, y: Number, width: number, height: number, layer?: any): void; /** * Gets the image index based on its name. * - * @param name - The name of the image to get. - * @return - The index of the image in this tilemap, or null if not found. + * @param name The name of the image to get. + * @return The index of the image in this tilemap, or null if not found. */ getImageIndex(name: string): number; /** * Gets the layer index based on the layers name. * - * @param location - The local array to search. - * @param name - The name of the array element to get. - * @return - The index of the element in the array, or null if not found. + * @param location The local array to search. + * @param name The name of the array element to get. + * @return The index of the element in the array, or null if not found. */ getIndex(location: any[], name: string): number; /** * Gets the TilemapLayer index as used in the setCollision calls. * - * @param layer - The layer to operate on. If not given will default to this.currentLayer. - * @return - The TilemapLayer index. + * @param layer The layer to operate on. If not given will default to this.currentLayer. + * @return The TilemapLayer index. */ getLayer(layer: any): number; /** * Gets the layer index based on its name. * - * @param name - The name of the layer to get. - * @return - The index of the layer in this tilemap, or null if not found. + * @param name The name of the layer to get. + * @return The index of the layer in this tilemap, or null if not found. */ getLayerIndex(name: string): number; /** * Gets the object index based on its name. * - * @param name - The name of the object to get. - * @return - The index of the object in this tilemap, or null if not found. + * @param name The name of the object to get. + * @return The index of the object in this tilemap, or null if not found. */ getObjectIndex(name: string): number; /** * Gets a tile from the Tilemap Layer. The coordinates are given in tile values. * - * @param x - X position to get the tile from (given in tile units, not pixels) - * @param y - Y position to get the tile from (given in tile units, not pixels) - * @param layer - The layer to get the tile from. - * @param nonNull - If true getTile won't return null for empty tiles, but a Tile object with an index of -1. - Default: false - * @return - The tile at the given coordinates or null if no tile was found or the coordinates were invalid. + * @param x X position to get the tile from (given in tile units, not pixels) + * @param y Y position to get the tile from (given in tile units, not pixels) + * @param layer The layer to get the tile from. + * @param nonNull If true getTile won't return null for empty tiles, but a Tile object with an index of -1. - Default: false + * @return The tile at the given coordinates or null if no tile was found or the coordinates were invalid. */ getTile(x: number, y: number, layer?: any, nonNull?: boolean): Phaser.Tile; @@ -21363,9 +21363,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Gets the tile above the tile coordinates given. * Mostly used as an internal function by calculateFaces. * - * @param layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). - * @param x - The x coordinate to get the tile from. In tiles, not pixels. - * @param y - The y coordinate to get the tile from. In tiles, not pixels. + * @param layer The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). + * @param x The x coordinate to get the tile from. In tiles, not pixels. + * @param y The y coordinate to get the tile from. In tiles, not pixels. */ getTileAbove(layer: number, x: number, y: number): Phaser.Tile; @@ -21373,9 +21373,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Gets the tile below the tile coordinates given. * Mostly used as an internal function by calculateFaces. * - * @param layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). - * @param x - The x coordinate to get the tile from. In tiles, not pixels. - * @param y - The y coordinate to get the tile from. In tiles, not pixels. + * @param layer The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). + * @param x The x coordinate to get the tile from. In tiles, not pixels. + * @param y The y coordinate to get the tile from. In tiles, not pixels. */ getTileBelow(layer: number, x: number, y: number): Phaser.Tile; @@ -21383,9 +21383,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Gets the tile to the left of the tile coordinates given. * Mostly used as an internal function by calculateFaces. * - * @param layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). - * @param x - The x coordinate to get the tile from. In tiles, not pixels. - * @param y - The y coordinate to get the tile from. In tiles, not pixels. + * @param layer The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). + * @param x The x coordinate to get the tile from. In tiles, not pixels. + * @param y The y coordinate to get the tile from. In tiles, not pixels. */ getTileLeft(layer: number, x: number, y: number): Phaser.Tile; @@ -21393,49 +21393,49 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Gets the tile to the right of the tile coordinates given. * Mostly used as an internal function by calculateFaces. * - * @param layer - The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). - * @param x - The x coordinate to get the tile from. In tiles, not pixels. - * @param y - The y coordinate to get the tile from. In tiles, not pixels. + * @param layer The local layer index to get the tile from. Can be determined by Tilemap.getLayer(). + * @param x The x coordinate to get the tile from. In tiles, not pixels. + * @param y The y coordinate to get the tile from. In tiles, not pixels. */ getTileRight(layer: number, x: number, y: number): Phaser.Tile; /** * Gets the tileset index based on its name. * - * @param name - The name of the tileset to get. - * @return - The index of the tileset in this tilemap, or null if not found. + * @param name The name of the tileset to get. + * @return The index of the tileset in this tilemap, or null if not found. */ getTilesetIndex(name: string): number; /** * Gets a tile from the Tilemap layer. The coordinates are given in pixel values. * - * @param x - X position to get the tile from (given in pixels) - * @param y - Y position to get the tile from (given in pixels) - * @param tileWidth - The width of the tiles. If not given the map default is used. - * @param tileHeight - The height of the tiles. If not given the map default is used. - * @param layer - The layer to get the tile from. - * @return - The tile at the given coordinates. + * @param x X position to get the tile from (given in pixels) + * @param y Y position to get the tile from (given in pixels) + * @param tileWidth The width of the tiles. If not given the map default is used. + * @param tileHeight The height of the tiles. If not given the map default is used. + * @param layer The layer to get the tile from. + * @return The tile at the given coordinates. */ getTileWorldXY(x: number, y: number, tileWidth?: number, tileHeight?: number, layer?: any): Phaser.Tile; /** * Checks if there is a tile at the given location. * - * @param x - X position to check if a tile exists at (given in tile units, not pixels) - * @param y - Y position to check if a tile exists at (given in tile units, not pixels) - * @param layer - The layer to set as current. - * @return - True if there is a tile at the given location, otherwise false. + * @param x X position to check if a tile exists at (given in tile units, not pixels) + * @param y Y position to check if a tile exists at (given in tile units, not pixels) + * @param layer The layer to set as current. + * @return True if there is a tile at the given location, otherwise false. */ hasTile(x: number, y: number, layer: Phaser.TilemapLayer): boolean; /** * Pastes a previously copied block of tile data into the given x/y coordinates. Data should have been prepared with Tilemap.copy. * - * @param x - X position of the top left of the area to paste to (given in tiles, not pixels) - * @param y - Y position of the top left of the area to paste to (given in tiles, not pixels) - * @param tileblock - The block of tiles to paste. - * @param layer - The layer to paste the tiles into. + * @param x X position of the top left of the area to paste to (given in tiles, not pixels) + * @param y Y position of the top left of the area to paste to (given in tiles, not pixels) + * @param tileblock The block of tiles to paste. + * @param layer The layer to paste the tiles into. */ paste(x: number, y: number, tileblock: Phaser.Tile[], layer?: any): void; @@ -21443,35 +21443,35 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Puts a tile of the given index value at the coordinate specified. * If you pass `null` as the tile it will pass your call over to Tilemap.removeTile instead. * - * @param tile - The index of this tile to set or a Phaser.Tile object. If null the tile is removed from the map. - * @param x - X position to place the tile (given in tile units, not pixels) - * @param y - Y position to place the tile (given in tile units, not pixels) - * @param layer - The layer to modify. - * @return - The Tile object that was created or added to this map. + * @param tile The index of this tile to set or a Phaser.Tile object. If null the tile is removed from the map. + * @param x X position to place the tile (given in tile units, not pixels) + * @param y Y position to place the tile (given in tile units, not pixels) + * @param layer The layer to modify. + * @return The Tile object that was created or added to this map. */ putTile(tile: any, x: number, y: number, layer?: any): Phaser.Tile; /** * Puts a tile into the Tilemap layer. The coordinates are given in pixel values. * - * @param tile - The index of this tile to set or a Phaser.Tile object. - * @param x - X position to insert the tile (given in pixels) - * @param y - Y position to insert the tile (given in pixels) - * @param tileWidth - The width of the tile in pixels. - * @param tileHeight - The height of the tile in pixels. - * @param layer - The layer to modify. - * @return - The Tile object that was created or added to this map. + * @param tile The index of this tile to set or a Phaser.Tile object. + * @param x X position to insert the tile (given in pixels) + * @param y Y position to insert the tile (given in pixels) + * @param tileWidth The width of the tile in pixels. + * @param tileHeight The height of the tile in pixels. + * @param layer The layer to modify. + * @return The Tile object that was created or added to this map. */ putTileWorldXY(tile: any, x: number, y: number, tileWidth: number, tileHeight: number, layer?: any): void; /** * Randomises a set of tiles in a given area. * - * @param x - X position of the top left of the area to operate one, given in tiles, not pixels. - * @param y - Y position of the top left of the area to operate one, given in tiles, not pixels. - * @param width - The width in tiles of the area to operate on. - * @param height - The height in tiles of the area to operate on. - * @param layer - The layer to operate on. + * @param x X position of the top left of the area to operate one, given in tiles, not pixels. + * @param y Y position of the top left of the area to operate one, given in tiles, not pixels. + * @param width The width in tiles of the area to operate on. + * @param height The height in tiles of the area to operate on. + * @param layer The layer to operate on. */ random(x: number, y: number, width: number, height: number, layer?: any): void; @@ -21483,35 +21483,35 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Removes the tile located at the given coordinates and updates the collision data. * - * @param x - X position to place the tile (given in tile units, not pixels) - * @param y - Y position to place the tile (given in tile units, not pixels) - * @param layer - The layer to modify. - * @return - The Tile object that was removed from this map. + * @param x X position to place the tile (given in tile units, not pixels) + * @param y Y position to place the tile (given in tile units, not pixels) + * @param layer The layer to modify. + * @return The Tile object that was removed from this map. */ removeTile(x: number, y: number, layer?: any): Phaser.Tile; /** * Removes the tile located at the given coordinates and updates the collision data. The coordinates are given in pixel values. * - * @param x - X position to insert the tile (given in pixels) - * @param y - Y position to insert the tile (given in pixels) - * @param tileWidth - The width of the tile in pixels. - * @param tileHeight - The height of the tile in pixels. - * @param layer - The layer to modify. - * @return - The Tile object that was removed from this map. + * @param x X position to insert the tile (given in pixels) + * @param y Y position to insert the tile (given in pixels) + * @param tileWidth The width of the tile in pixels. + * @param tileHeight The height of the tile in pixels. + * @param layer The layer to modify. + * @return The Tile object that was removed from this map. */ removeTileWorldXY(x: number, y: number, tileWidth: number, tileHeight: number, layer?: any): Phaser.Tile; /** * Scans the given area for tiles with an index matching `source` and updates their index to match `dest`. * - * @param source - The tile index value to scan for. - * @param dest - The tile index value to replace found tiles with. - * @param x - X position of the top left of the area to operate one, given in tiles, not pixels. - * @param y - Y position of the top left of the area to operate one, given in tiles, not pixels. - * @param width - The width in tiles of the area to operate on. - * @param height - The height in tiles of the area to operate on. - * @param layer - The layer to operate on. + * @param source The tile index value to scan for. + * @param dest The tile index value to replace found tiles with. + * @param x X position of the top left of the area to operate one, given in tiles, not pixels. + * @param y Y position of the top left of the area to operate one, given in tiles, not pixels. + * @param width The width in tiles of the area to operate on. + * @param height The height in tiles of the area to operate on. + * @param layer The layer to operate on. */ replace(source: number, dest: number, x: number, y: number, width: number, height: number, layer?: any): void; @@ -21521,11 +21521,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The search starts from the top-left tile and continues horizontally until it hits the end of the row, then it drops down to the next column. * If the reverse boolean is true, it scans starting from the bottom-right corner travelling up to the top-left. * - * @param index - The tile index value to search for. - * @param skip - The number of times to skip a matching tile before returning. - Default: 0 - * @param reverse - If true it will scan the layer in reverse, starting at the bottom-right. Otherwise it scans from the top-left. - Default: false - * @param layer - The layer to get the tile from. - * @return - The first (or n skipped) tile with the matching index. + * @param index The tile index value to search for. + * @param skip The number of times to skip a matching tile before returning. - Default: 0 + * @param reverse If true it will scan the layer in reverse, starting at the bottom-right. Otherwise it scans from the top-left. - Default: false + * @param layer The layer to get the tile from. + * @return The first (or n skipped) tile with the matching index. */ searchTileIndex(index: number, skip?: number, reverse?: boolean, layer?: any): Phaser.Tile; @@ -21533,10 +21533,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Sets collision the given tile or tiles. You can pass in either a single numeric index or an array of indexes: [ 2, 3, 15, 20]. * The `collides` parameter controls if collision will be enabled (true) or disabled (false). * - * @param indexes - Either a single tile index, or an array of tile IDs to be checked for collision. - * @param collides - If true it will enable collision. If false it will clear collision. - Default: true - * @param layer - The layer to operate on. If not given will default to this.currentLayer. - * @param recalculate - Recalculates the tile faces after the update. - Default: true + * @param indexes Either a single tile index, or an array of tile IDs to be checked for collision. + * @param collides If true it will enable collision. If false it will clear collision. - Default: true + * @param layer The layer to operate on. If not given will default to this.currentLayer. + * @param recalculate Recalculates the tile faces after the update. - Default: true */ setCollision(indexes: any, collides?: boolean, layer?: any, recalculate?: boolean): void; @@ -21545,11 +21545,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Calling this with a start value of 10 and a stop value of 14 would set collision for tiles 10, 11, 12, 13 and 14. * The `collides` parameter controls if collision will be enabled (true) or disabled (false). * - * @param start - The first index of the tile to be set for collision. - * @param stop - The last index of the tile to be set for collision. - * @param collides - If true it will enable collision. If false it will clear collision. - Default: true - * @param layer - The layer to operate on. If not given will default to this.currentLayer. - * @param recalculate - Recalculates the tile faces after the update. - Default: true + * @param start The first index of the tile to be set for collision. + * @param stop The last index of the tile to be set for collision. + * @param collides If true it will enable collision. If false it will clear collision. - Default: true + * @param layer The layer to operate on. If not given will default to this.currentLayer. + * @param recalculate Recalculates the tile faces after the update. - Default: true */ setCollisionBetween(start: number, stop: number, collides?: boolean, layer?: any, recalculate?: boolean): void; @@ -21557,10 +21557,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Sets collision on all tiles in the given layer, except for the IDs of those in the given array. * The `collides` parameter controls if collision will be enabled (true) or disabled (false). * - * @param indexes - An array of the tile IDs to not be counted for collision. - * @param collides - If true it will enable collision. If false it will clear collision. - Default: true - * @param layer - The layer to operate on. If not given will default to this.currentLayer. - * @param recalculate - Recalculates the tile faces after the update. - Default: true + * @param indexes An array of the tile IDs to not be counted for collision. + * @param collides If true it will enable collision. If false it will clear collision. - Default: true + * @param layer The layer to operate on. If not given will default to this.currentLayer. + * @param recalculate Recalculates the tile faces after the update. - Default: true */ setCollisionByExclusion(indexes: any[], collides?: boolean, layer?: any, recalculate?: boolean): void; @@ -21568,17 +21568,17 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Sets collision values on a tile in the set. * You shouldn't usually call this method directly, instead use setCollision, setCollisionBetween or setCollisionByExclusion. * - * @param index - The index of the tile on the layer. - * @param collides - If true it will enable collision on the tile. If false it will clear collision values from the tile. - Default: true - * @param layer - The layer to operate on. If not given will default to this.currentLayer. - * @param recalculate - Recalculates the tile faces after the update. - Default: true + * @param index The index of the tile on the layer. + * @param collides If true it will enable collision on the tile. If false it will clear collision values from the tile. - Default: true + * @param layer The layer to operate on. If not given will default to this.currentLayer. + * @param recalculate Recalculates the tile faces after the update. - Default: true */ setCollisionByIndex(index: number, collides?: boolean, layer?: number, recalculate?: boolean): void; /** * Sets the current layer to the given index. * - * @param layer - The layer to set as current. + * @param layer The layer to set as current. */ setLayer(layer: any): void; @@ -21586,7 +21586,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Turn off/on the recalculation of faces for tile or collision updates. * `setPreventRecalculate(true)` puts recalculation on hold while `setPreventRecalculate(false)` recalculates all the changed layers. * - * @param value - If true it will put the recalculation on hold. + * @param value If true it will put the recalculation on hold. */ setPreventRecalculate(value: boolean): void; @@ -21595,10 +21595,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. * If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback. * - * @param indexes - Either a single tile index, or an array of tile indexes to have a collision callback set for. - * @param callback - The callback that will be invoked when the tile is collided with. - * @param callbackContext - The context under which the callback is called. - * @param layer - The layer to operate on. If not given will default to this.currentLayer. + * @param indexes Either a single tile index, or an array of tile indexes to have a collision callback set for. + * @param callback The callback that will be invoked when the tile is collided with. + * @param callbackContext The context under which the callback is called. + * @param layer The layer to operate on. If not given will default to this.currentLayer. */ setTileIndexCallback(indexes: any, callback: Function, callbackContext: any, layer?: any): void; @@ -21607,45 +21607,45 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If a callback is already set for the tile index it will be replaced. Set the callback to null to remove it. * If you want to set a callback for a tile at a specific location on the map then see setTileLocationCallback. * - * @param x - X position of the top left of the area to copy (given in tiles, not pixels) - * @param y - Y position of the top left of the area to copy (given in tiles, not pixels) - * @param width - The width of the area to copy (given in tiles, not pixels) - * @param height - The height of the area to copy (given in tiles, not pixels) - * @param callback - The callback that will be invoked when the tile is collided with. - * @param callbackContext - The context under which the callback is called. - * @param layer - The layer to operate on. If not given will default to this.currentLayer. + * @param x X position of the top left of the area to copy (given in tiles, not pixels) + * @param y Y position of the top left of the area to copy (given in tiles, not pixels) + * @param width The width of the area to copy (given in tiles, not pixels) + * @param height The height of the area to copy (given in tiles, not pixels) + * @param callback The callback that will be invoked when the tile is collided with. + * @param callbackContext The context under which the callback is called. + * @param layer The layer to operate on. If not given will default to this.currentLayer. */ setTileLocationCallback(x: number, y: number, width: number, height: number, callback: Function, callbackContext: any, layer?: any): void; /** * Sets the base tile size for the map. * - * @param tileWidth - The width of the tiles the map uses for calculations. - * @param tileHeight - The height of the tiles the map uses for calculations. + * @param tileWidth The width of the tiles the map uses for calculations. + * @param tileHeight The height of the tiles the map uses for calculations. */ setTileSize(tileWidth: number, tileHeight: number): void; /** * Shuffles a set of tiles in a given area. It will only randomise the tiles in that area, so if they're all the same nothing will appear to have changed! * - * @param x - X position of the top left of the area to operate one, given in tiles, not pixels. - * @param y - Y position of the top left of the area to operate one, given in tiles, not pixels. - * @param width - The width in tiles of the area to operate on. - * @param height - The height in tiles of the area to operate on. - * @param layer - The layer to operate on. + * @param x X position of the top left of the area to operate one, given in tiles, not pixels. + * @param y Y position of the top left of the area to operate one, given in tiles, not pixels. + * @param width The width in tiles of the area to operate on. + * @param height The height in tiles of the area to operate on. + * @param layer The layer to operate on. */ shuffle(x: number, y: number, width: number, height: number, layer: any): void; /** * Scans the given area for tiles with an index matching tileA and swaps them with tileB. * - * @param tileA - First tile index. - * @param tileB - Second tile index. - * @param x - X position of the top left of the area to operate one, given in tiles, not pixels. - * @param y - Y position of the top left of the area to operate one, given in tiles, not pixels. - * @param width - The width in tiles of the area to operate on. - * @param height - The height in tiles of the area to operate on. - * @param layer - The layer to operate on. + * @param tileA First tile index. + * @param tileB Second tile index. + * @param x X position of the top left of the area to operate one, given in tiles, not pixels. + * @param y Y position of the top left of the area to operate one, given in tiles, not pixels. + * @param width The width in tiles of the area to operate on. + * @param height The height in tiles of the area to operate on. + * @param layer The layer to operate on. */ swap(tileA: number, tileB: number, x: number, y: number, width: number, height: number, layer?: any): void; @@ -21669,11 +21669,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * By default TilemapLayers have fixedToCamera set to `true`. Changing this will break Camera follow and scrolling behaviour. * - * @param game - Game reference to the currently running game. - * @param tilemap - The tilemap to which this layer belongs. - * @param index - The index of the TileLayer to render within the Tilemap. - * @param width - Width of the renderable area of the layer (in pixels). - * @param height - Height of the renderable area of the layer (in pixels). + * @param game Game reference to the currently running game. + * @param tilemap The tilemap to which this layer belongs. + * @param index The index of the TileLayer to render within the Tilemap. + * @param width Width of the renderable area of the layer (in pixels). + * @param height Height of the renderable area of the layer (in pixels). */ constructor(game: Phaser.Game, tilemap: Phaser.Tilemap, index: number, width?: number, height?: number); @@ -21798,50 +21798,50 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Gets all tiles that intersect with the given line. * - * @param line - The line used to determine which tiles to return. - * @param stepRate - How many steps through the ray will we check? Defaults to `rayStepRate`. - Default: (rayStepRate) - * @param collides - If true, _only_ return tiles that collide on one or more faces. - Default: false - * @param interestingFace - If true, _only_ return tiles that have interesting faces. - Default: false - * @return - An array of Phaser.Tiles. + * @param line The line used to determine which tiles to return. + * @param stepRate How many steps through the ray will we check? Defaults to `rayStepRate`. - Default: (rayStepRate) + * @param collides If true, _only_ return tiles that collide on one or more faces. - Default: false + * @param interestingFace If true, _only_ return tiles that have interesting faces. - Default: false + * @return An array of Phaser.Tiles. */ getRayCastTiles(line: Phaser.Line, stepRate?: number, collides?: boolean, interestingFace?: boolean): Phaser.Tile[]; /** * Get all tiles that exist within the given area, defined by the top-left corner, width and height. Values given are in pixels, not tiles. * - * @param x - X position of the top left corner (in pixels). - * @param y - Y position of the top left corner (in pixels). - * @param width - Width of the area to get (in pixels). - * @param height - Height of the area to get (in pixels). - * @param collides - If true, _only_ return tiles that collide on one or more faces. - Default: false - * @param interestingFace - If true, _only_ return tiles that have interesting faces. - Default: false - * @return - An array of Tiles. + * @param x X position of the top left corner (in pixels). + * @param y Y position of the top left corner (in pixels). + * @param width Width of the area to get (in pixels). + * @param height Height of the area to get (in pixels). + * @param collides If true, _only_ return tiles that collide on one or more faces. - Default: false + * @param interestingFace If true, _only_ return tiles that have interesting faces. - Default: false + * @return An array of Tiles. */ getTiles(x: number, y: number, width: number, height: number, collides?: boolean, interestingFace?: boolean): Phaser.Tile[]; /** * Convert a pixel value to a tile coordinate. * - * @param x - X position of the point in target tile (in pixels). - * @return - The X map location of the tile. + * @param x X position of the point in target tile (in pixels). + * @return The X map location of the tile. */ getTileX(x: number): number; /** * Convert a pixel coordinate to a tile coordinate. * - * @param x - X position of the point in target tile (in pixels). - * @param y - Y position of the point in target tile (in pixels). - * @param point - The Point/object to update. - * @return - A Point/object with its `x` and `y` properties set. + * @param x X position of the point in target tile (in pixels). + * @param y Y position of the point in target tile (in pixels). + * @param point The Point/object to update. + * @return A Point/object with its `x` and `y` properties set. */ getTileXY(x: number, y: number, point: Phaser.Point): Phaser.Point; /** * Convert a pixel value to a tile coordinate. * - * @param y - Y position of the point in target tile (in pixels). - * @return - The Y map location of the tile. + * @param y Y position of the point in target tile (in pixels). + * @return The Y map location of the tile. */ getTileY(y: number): number; @@ -21879,38 +21879,38 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Returns an empty map data object. - * @return - Generated map data. + * @return Generated map data. */ static getEmptyData(tileWidth?: number, tileHeight?: number, width?: number, height?: number): any; /** * Parse tilemap data from the cache and creates a Tilemap object. * - * @param game - Game reference to the currently running game. - * @param key - The key of the tilemap in the Cache. - * @param tileWidth - The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. - Default: 32 - * @param tileHeight - The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. - Default: 32 - * @param width - The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. - Default: 10 - * @param height - The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. - Default: 10 - * @return - The parsed map object. + * @param game Game reference to the currently running game. + * @param key The key of the tilemap in the Cache. + * @param tileWidth The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. - Default: 32 + * @param tileHeight The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. - Default: 32 + * @param width The width of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. - Default: 10 + * @param height The height of the map in tiles. If this map is created from Tiled or CSV data you don't need to specify this. - Default: 10 + * @return The parsed map object. */ static parse(game: Phaser.Game, key: string, tileWidth?: number, tileHeight?: number, width?: number, height?: number): any; /** * Parses a CSV file into valid map data. * - * @param data - The CSV file data. - * @param tileWidth - The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. - Default: 32 - * @param tileHeight - The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. - Default: 32 - * @return - Generated map data. + * @param data The CSV file data. + * @param tileWidth The pixel width of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. - Default: 32 + * @param tileHeight The pixel height of a single map tile. If using CSV data you must specify this. Not required if using Tiled map data. - Default: 32 + * @return Generated map data. */ static parseCSV(key: string, data: string, tileWidth?: number, tileHeight?: number): any; /** * Parses a Tiled JSON file into valid map data. * - * @param json - The JSON map data. - * @return - Generated and parsed map data. + * @param json The JSON map data. + * @return Generated and parsed map data. */ static parseJSON(json: any): any; @@ -21930,13 +21930,13 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Tilesets are normally created automatically when Tiled data is loaded. * - * @param name - The name of the tileset in the map data. - * @param firstgid - The first tile index this tileset contains. - * @param width - Width of each tile (in pixels). - Default: 32 - * @param height - Height of each tile (in pixels). - Default: 32 - * @param margin - The margin around all tiles in the sheet (in pixels). - Default: 0 - * @param spacing - The spacing between each tile in the sheet (in pixels). - Default: 0 - * @param properties - Custom Tileset properties. - Default: {} + * @param name The name of the tileset in the map data. + * @param firstgid The first tile index this tileset contains. + * @param width Width of each tile (in pixels). - Default: 32 + * @param height Height of each tile (in pixels). - Default: 32 + * @param margin The margin around all tiles in the sheet (in pixels). - Default: 0 + * @param spacing The spacing between each tile in the sheet (in pixels). - Default: 0 + * @param properties Custom Tileset properties. - Default: {} */ constructor(name: string, firstgid: number, width?: number, height?: number, margin?: number, spacing?: number, properties?: any); @@ -22002,32 +22002,32 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Returns true if and only if this tileset contains the given tile index. - * @return - True if this tileset contains the given index. + * @return True if this tileset contains the given index. */ containsTileIndex(tileIndex: number): boolean; /** * Draws a tile from this Tileset at the given coordinates on the context. * - * @param context - The context to draw the tile onto. - * @param x - The x coordinate to draw to. - * @param y - The y coordinate to draw to. - * @param index - The index of the tile within the set to draw. + * @param context The context to draw the tile onto. + * @param x The x coordinate to draw to. + * @param y The y coordinate to draw to. + * @param index The index of the tile within the set to draw. */ draw(context: CanvasRenderingContext2D, x: number, y: number, index: number): void; /** * Set the image associated with this Tileset and update the tile data. * - * @param image - The image that contains the tiles. + * @param image The image that contains the tiles. */ setImage(image: any): void; /** * Sets tile spacing and margins. * - * @param tileMargin - The margin around the tiles in the sheet (in pixels). - * @param tileSpacing - The spacing between the tiles in the sheet (in pixels). + * @param tileMargin The margin around the tiles in the sheet (in pixels). + * @param tileSpacing The spacing between the tiles in the sheet (in pixels). */ setSpacing(margin?: number, spacing?: number): void; @@ -22045,13 +22045,13 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * A TileSprite is a Sprite that has a repeating texture. The texture can be scrolled and scaled and will automatically wrap on the edges as it does so. * Please note that TileSprites, as with normal Sprites, have no input handler or physics bodies by default. Both need enabling. * - * @param game - A reference to the currently running game. - * @param x - The x coordinate (in world space) to position the TileSprite at. - * @param y - The y coordinate (in world space) to position the TileSprite at. - * @param width - The width of the TileSprite. - * @param height - The height of the TileSprite. - * @param key - This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. - * @param frame - If this TileSprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. + * @param game A reference to the currently running game. + * @param x The x coordinate (in world space) to position the TileSprite at. + * @param y The y coordinate (in world space) to position the TileSprite at. + * @param width The width of the TileSprite. + * @param height The height of the TileSprite. + * @param key This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture or PIXI.Texture. + * @param frame If this TileSprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. */ constructor(game: Phaser.Game, x: number, y: number, width: number, height: number, key?: any, frame?: any); @@ -22193,8 +22193,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * A negative x value will scroll to the left. A positive x value will scroll to the right. * A negative y value will scroll up. A positive y value will scroll down. * - * @param x - Horizontal scroll speed in pixels per second. - * @param y - Vertical scroll speed in pixels per second. + * @param x Horizontal scroll speed in pixels per second. + * @param y Vertical scroll speed in pixels per second. */ autoScroll(x: number, y: number): void; @@ -22202,7 +22202,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Destroys the TileSprite. This removes it from its parent group, destroys the event and animation handlers if present * and nulls its reference to game, freeing it up for garbage collection. * - * @param destroyChildren - Should every child of this object have its destroy method called? - Default: true + * @param destroyChildren Should every child of this object have its destroy method called? - Default: true */ destroy(destroyChildren: boolean): void; @@ -22210,8 +22210,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Changes the Texture the TileSprite is using entirely. The old texture is removed and the new one is referenced or fetched from the Cache. * This causes a WebGL texture update, so use sparingly or in low-intensity portions of your game. * - * @param key - This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. - * @param frame - If this TileSprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. + * @param key This is the image or texture used by the TileSprite during rendering. It can be a string which is a reference to the Cache entry, or an instance of a RenderTexture, BitmapData or PIXI.Texture. + * @param frame If this TileSprite is using part of a sprite sheet or texture atlas you can specify the exact frame to use by giving a string or numeric index. */ loadTexture(key: any, frame: any): void; @@ -22219,11 +22219,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Play an animation based on the given key. The animation should previously have been added via sprite.animations.add() * If the requested animation is already playing this request will be ignored. If you need to reset an already running animation do so directly on the Animation object itself. * - * @param name - The name of the animation to be played, e.g. "fire", "walk", "jump". - * @param frameRate - The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. - Default: null - * @param loop - Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. - Default: false - * @param killOnComplete - If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. - Default: false - * @return - A reference to playing Animation instance. + * @param name The name of the animation to be played, e.g. "fire", "walk", "jump". + * @param frameRate The framerate to play the animation at. The speed is given in frames per second. If not provided the previously set frameRate of the Animation is used. - Default: null + * @param loop Should the animation be looped after playback. If not provided the previously set loop value of the Animation is used. - Default: false + * @param killOnComplete If set to true when the animation completes (only happens if loop=false) the parent Sprite will be killed. - Default: false + * @return A reference to playing Animation instance. */ play(name: string, frameRate?: number, loop?: boolean, killOnComplete?: boolean): Phaser.Animation; @@ -22242,9 +22242,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * sets alive, exists, visible and renderable all to true. Also resets the outOfBounds state. * If the TileSprite has a physics body that too is reset. * - * @param x - The x coordinate (in world space) to position the Sprite at. - * @param y - The y coordinate (in world space) to position the Sprite at. - * @return - (Phaser.TileSprite) This instance. + * @param x The x coordinate (in world space) to position the Sprite at. + * @param y The y coordinate (in world space) to position the Sprite at. + * @return (Phaser.TileSprite) This instance. */ reset(x: number, y: number): Phaser.TileSprite; @@ -22252,7 +22252,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Sets the Texture frame the TileSprite uses for rendering. * This is primarily an internal method used by TileSprite.loadTexture, although you may call it directly. * - * @param frame - The Frame to be used by the TileSprite texture. + * @param frame The Frame to be used by the TileSprite texture. */ setFrame(frame: Phaser.Frame): void; @@ -22288,7 +22288,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * To create a general timed event, use the master {@link Phaser.Timer} accessible through {@link Phaser.Time.events events}. * - * @param game - A reference to the currently running game. + * @param game A reference to the currently running game. */ constructor(game: Phaser.Game); @@ -22459,8 +22459,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Adds an existing Phaser.Timer object to the Timer pool. * - * @param timer - An existing Phaser.Timer object. - * @return - The given Phaser.Timer object. + * @param timer An existing Phaser.Timer object. + * @return The given Phaser.Timer object. */ add(timer: Phaser.Timer): Phaser.Timer; @@ -22472,24 +22472,24 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Creates a new stand-alone Phaser.Timer object. * - * @param autoDestroy - A Timer that is set to automatically destroy itself will do so after all of its events have been dispatched (assuming no looping events). - Default: true - * @return - The Timer object that was created. + * @param autoDestroy A Timer that is set to automatically destroy itself will do so after all of its events have been dispatched (assuming no looping events). - Default: true + * @return The Timer object that was created. */ create(autoDestroy?: boolean): Phaser.Timer; /** * How long has passed since the given time (in seconds). * - * @param since - The time you want to measure (in seconds). - * @return - Duration between given time and now (in seconds). + * @param since The time you want to measure (in seconds). + * @return Duration between given time and now (in seconds). */ elapsedSecondsSince(since: number): number; /** * How long has passed since the given time. * - * @param since - The time you want to measure against. - * @return - The difference between the given time and now. + * @param since The time you want to measure against. + * @return The difference between the given time and now. */ elapsedSince(since: number): number; @@ -22505,14 +22505,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * The number of seconds that have elapsed since the game was started. - * @return - The number of seconds that have elapsed since the game was started. + * @return The number of seconds that have elapsed since the game was started. */ totalElapsedSeconds(): number; /** * Updates the game clock and if enabled the advanced timing data. This is called automatically by Phaser.Game. * - * @param time - The current relative timestamp; see {@link Phaser.Time#now now}. + * @param time The current relative timestamp; see {@link Phaser.Time#now now}. */ update(time: number): void; @@ -22540,8 +22540,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Timers are based on real-world (not physics) time, adjusted for game pause durations. * - * @param game - A reference to the currently running game. - * @param autoDestroy - If true, the timer will automatically destroy itself after all the events have been dispatched (assuming no looping events). - Default: true + * @param game A reference to the currently running game. + * @param autoDestroy If true, the timer will automatically destroy itself after all the events have been dispatched (assuming no looping events). - Default: true */ constructor(game: Phaser.Game, autoDestroy?: boolean); @@ -22648,11 +22648,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Make sure to call {@link Phaser.Timer#start start} after adding all of the Events you require for this Timer. * - * @param delay - The number of milliseconds that should elapse before the callback is invoked. - * @param callback - The callback that will be called when the Timer event occurs. - * @param callbackContext - The context in which the callback will be called. - * @param args - Additional arguments that will be supplied to the callback. - * @return - The Phaser.TimerEvent object that was created. + * @param delay The number of milliseconds that should elapse before the callback is invoked. + * @param callback The callback that will be called when the Timer event occurs. + * @param callbackContext The context in which the callback will be called. + * @param args Additional arguments that will be supplied to the callback. + * @return The Phaser.TimerEvent object that was created. */ add(delay: number, callback: Function, callbackContext: any, ...args: any[]): Phaser.TimerEvent; @@ -22675,11 +22675,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Make sure to call {@link Phaser.Timer#start start} after adding all of the Events you require for this Timer. * - * @param delay - The number of milliseconds that should elapse before the Timer will call the given callback. - * @param callback - The callback that will be called when the Timer event occurs. - * @param callbackContext - The context in which the callback will be called. - * @param args - Additional arguments that will be supplied to the callback. - * @return - The Phaser.TimerEvent object that was created. + * @param delay The number of milliseconds that should elapse before the Timer will call the given callback. + * @param callback The callback that will be called when the Timer event occurs. + * @param callbackContext The context in which the callback will be called. + * @param args Additional arguments that will be supplied to the callback. + * @return The Phaser.TimerEvent object that was created. */ loop(delay: number, callback: Function, callbackContext: any, ...args: any[]): Phaser.TimerEvent; @@ -22697,7 +22697,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Removes a pending TimerEvent from the queue. * - * @param event - The event to remove from the queue. + * @param event The event to remove from the queue. */ remove(event: Phaser.TimerEvent): boolean; @@ -22715,12 +22715,12 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Make sure to call {@link Phaser.Timer#start start} after adding all of the Events you require for this Timer. * - * @param delay - The number of milliseconds that should elapse before the Timer will call the given callback. - * @param repeatCount - The number of times the event will repeat once is has finished playback. A repeatCount of 1 means it will repeat itself once, playing the event twice in total. - * @param callback - The callback that will be called when the Timer event occurs. - * @param callbackContext - The context in which the callback will be called. - * @param args - Additional arguments that will be supplied to the callback. - * @return - The Phaser.TimerEvent object that was created. + * @param delay The number of milliseconds that should elapse before the Timer will call the given callback. + * @param repeatCount The number of times the event will repeat once is has finished playback. A repeatCount of 1 means it will repeat itself once, playing the event twice in total. + * @param callback The callback that will be called when the Timer event occurs. + * @param callbackContext The context in which the callback will be called. + * @param args Additional arguments that will be supplied to the callback. + * @return The Phaser.TimerEvent object that was created. */ repeat(delay: number, repeatCount: number, callback: Function, callbackContext: any, ...args: any[]): Phaser.TimerEvent; @@ -22737,22 +22737,22 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Starts this Timer running. * - * @param delay - The number of milliseconds that should elapse before the Timer will start. - Default: 0 + * @param delay The number of milliseconds that should elapse before the Timer will start. - Default: 0 */ start(startDelay?: number): void; /** * Stops this Timer from running. Does not cause it to be destroyed if autoDestroy is set to true. * - * @param clearEvents - If true all the events in Timer will be cleared, otherwise they will remain. - Default: true + * @param clearEvents If true all the events in Timer will be cleared, otherwise they will remain. - Default: true */ stop(clearEvents?: boolean): void; /** * The main Timer update event, called automatically by Phaser.Time.update. * - * @param time - The time from the core game clock. - * @return - True if there are still events waiting to be dispatched, otherwise false if this Timer can be destroyed. + * @param time The time from the core game clock. + * @return True if there are still events waiting to be dispatched, otherwise false if this Timer can be destroyed. */ update(time: number): boolean; @@ -22778,14 +22778,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Use {@link Phaser.Timer#add}, {@link Phaser.Timer#add}, or {@link Phaser.Timer#add} methods to create a new event. * - * @param timer - The Timer object that this TimerEvent belongs to. - * @param delay - The delay in ms at which this TimerEvent fires. - * @param tick - The tick is the next game clock time that this event will fire at. - * @param repeatCount - If this TimerEvent repeats it will do so this many times. - * @param loop - True if this TimerEvent loops, otherwise false. - * @param callback - The callback that will be called when the TimerEvent occurs. - * @param callbackContext - The context in which the callback will be called. - * @param arguments - Additional arguments to be passed to the callback. + * @param timer The Timer object that this TimerEvent belongs to. + * @param delay The delay in ms at which this TimerEvent fires. + * @param tick The tick is the next game clock time that this event will fire at. + * @param repeatCount If this TimerEvent repeats it will do so this many times. + * @param loop True if this TimerEvent loops, otherwise false. + * @param callback The callback that will be called when the TimerEvent occurs. + * @param callbackContext The context in which the callback will be called. + * @param arguments Additional arguments to be passed to the callback. */ constructor(timer: Phaser.Timer, delay: number, tick: number, repeatCount: number, loop: boolean, callback: Function, callbackContext: any, ...args: any[]); @@ -22847,7 +22847,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Phaser.Touch handles touch events with your game. Note: Android 2.x only supports 1 touch event at once, no multi-touch. * - * @param game - A reference to the currently running game. + * @param game A reference to the currently running game. */ constructor(game: Phaser.Game); @@ -22921,14 +22921,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Touch cancel - touches that were disrupted (perhaps by moving into a plugin or browser chrome). * Occurs for example on iOS when you put down 4 fingers and the app selector UI appears. * - * @param event - The native event from the browser. This gets stored in Touch.event. + * @param event The native event from the browser. This gets stored in Touch.event. */ onTouchCancel(event: any): void; /** * The handler for the touchend events. * - * @param event - The native event from the browser. This gets stored in Touch.event. + * @param event The native event from the browser. This gets stored in Touch.event. */ onTouchEnd(event: any): void; @@ -22936,7 +22936,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * For touch enter and leave its a list of the touch points that have entered or left the target. * Doesn't appear to be supported by most browsers on a canvas element yet. * - * @param event - The native event from the browser. This gets stored in Touch.event. + * @param event The native event from the browser. This gets stored in Touch.event. */ onTouchEnter(event: any): void; @@ -22944,21 +22944,21 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * For touch enter and leave its a list of the touch points that have entered or left the target. * Doesn't appear to be supported by most browsers on a canvas element yet. * - * @param event - The native event from the browser. This gets stored in Touch.event. + * @param event The native event from the browser. This gets stored in Touch.event. */ onTouchLeave(event: any): void; /** * The handler for the touchmove events. * - * @param event - The native event from the browser. This gets stored in Touch.event. + * @param event The native event from the browser. This gets stored in Touch.event. */ onTouchMove(event: any): void; /** * The internal method that handles the touchstart event from the browser. * - * @param event - The native event from the browser. This gets stored in Touch.event. + * @param event The native event from the browser. This gets stored in Touch.event. */ onTouchStart(event: any): void; @@ -22992,9 +22992,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * by calling Tween.to multiple times on the same Tween. Additional tweens specified in this way become "child" tweens and * are played through in sequence. You can use Tween.timeScale and Tween.reverse to control the playback of this Tween and all of its children. * - * @param target - The target object, such as a Phaser.Sprite or Phaser.Sprite.scale. - * @param game - Current game instance. - * @param manager - The TweenManager responsible for looking after this Tween. + * @param target The target object, such as a Phaser.Sprite or Phaser.Sprite.scale. + * @param game Current game instance. + * @param manager The TweenManager responsible for looking after this Tween. */ constructor(target: any, game: Phaser.Game, manager: Phaser.TweenManager); @@ -23125,8 +23125,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * For example if this is Tween A and you pass in B, C and D then B will be chained to A, C will be chained to B and D will be chained to C. * Any previously chained tweens that may have been set will be overwritten. * - * @param tweens - One or more tweens that will be chained to this one. - * @return - This tween. Useful for method chaining. + * @param tweens One or more tweens that will be chained to this one. + * @return This tween. Useful for method chaining. */ chain(...args: any[]): Phaser.Tween; @@ -23136,9 +23136,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If you have not yet called `Tween.to` or `Tween.from` at least once then this method will do nothing, as there are no tweens to delay. * If you have child tweens and pass -1 as the index value it sets the delay across all of them. * - * @param duration - The amount of time in ms that the Tween should wait until it begins once started is called. Set to zero to remove any active delay. - * @param index - If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the delay on all the children. - Default: 0 - * @return - This tween. Useful for method chaining. + * @param duration The amount of time in ms that the Tween should wait until it begins once started is called. Set to zero to remove any active delay. + * @param index If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the delay on all the children. - Default: 0 + * @return This tween. Useful for method chaining. */ delay(duration: number, index?: number): Phaser.Tween; @@ -23148,9 +23148,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types. * If you have child tweens and pass -1 as the index value it sets the easing function defined here across all of them. * - * @param ease - The easing function this tween will use, i.e. Phaser.Easing.Linear.None. - * @param index - If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the easing function on all children. - Default: 0 - * @return - This tween. Useful for method chaining. + * @param ease The easing function this tween will use, i.e. Phaser.Easing.Linear.None. + * @param index If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the easing function on all children. - Default: 0 + * @return This tween. Useful for method chaining. */ easing(ease: Function, index?: number): Phaser.Tween; @@ -23160,9 +23160,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types. * If you have child tweens and pass -1 as the index value it sets the easing function defined here across all of them. * - * @param ease - The easing function this tween will use, i.e. Phaser.Easing.Linear.None. - * @param index - If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the easing function on all children. - Default: 0 - * @return - This tween. Useful for method chaining. + * @param ease The easing function this tween will use, i.e. Phaser.Easing.Linear.None. + * @param index If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the easing function on all children. - Default: 0 + * @return This tween. Useful for method chaining. */ easing(ease: string, index?: number): Phaser.Tween; @@ -23172,14 +23172,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". * ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types. * - * @param properties - An object containing the properties you want to tween., such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object. - * @param duration - Duration of this tween in ms. - Default: 1000 - * @param ease - Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden. - Default: null - * @param autoStart - Set to `true` to allow this tween to start automatically. Otherwise call Tween.start(). - Default: false - * @param delay - Delay before this tween will start in milliseconds. Defaults to 0, no delay. - Default: 0 - * @param repeat - Should the tween automatically restart once complete? If you want it to run forever set as -1. This only effects this induvidual tween, not any chained tweens. - Default: 0 - * @param yoyo - A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead. - Default: false - * @return - This Tween object. + * @param properties An object containing the properties you want to tween., such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object. + * @param duration Duration of this tween in ms. - Default: 1000 + * @param ease Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden. - Default: null + * @param autoStart Set to `true` to allow this tween to start automatically. Otherwise call Tween.start(). - Default: false + * @param delay Delay before this tween will start in milliseconds. Defaults to 0, no delay. - Default: 0 + * @param repeat Should the tween automatically restart once complete? If you want it to run forever set as -1. This only effects this induvidual tween, not any chained tweens. - Default: 0 + * @param yoyo A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead. - Default: false + * @return This Tween object. */ from(properties: any, duration?: number, ease?: Function, autoStart?: boolean, delay?: number, repeat?: number, yoyo?: boolean): Phaser.Tween; @@ -23189,14 +23189,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". * ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types. * - * @param properties - An object containing the properties you want to tween., such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object. - * @param duration - Duration of this tween in ms. - Default: 1000 - * @param ease - Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden. - Default: null - * @param autoStart - Set to `true` to allow this tween to start automatically. Otherwise call Tween.start(). - Default: false - * @param delay - Delay before this tween will start in milliseconds. Defaults to 0, no delay. - Default: 0 - * @param repeat - Should the tween automatically restart once complete? If you want it to run forever set as -1. This only effects this induvidual tween, not any chained tweens. - Default: 0 - * @param yoyo - A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead. - Default: false - * @return - This Tween object. + * @param properties An object containing the properties you want to tween., such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object. + * @param duration Duration of this tween in ms. - Default: 1000 + * @param ease Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden. - Default: null + * @param autoStart Set to `true` to allow this tween to start automatically. Otherwise call Tween.start(). - Default: false + * @param delay Delay before this tween will start in milliseconds. Defaults to 0, no delay. - Default: 0 + * @param repeat Should the tween automatically restart once complete? If you want it to run forever set as -1. This only effects this induvidual tween, not any chained tweens. - Default: 0 + * @param yoyo A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead. - Default: false + * @return This Tween object. */ from(properties: any, duration?: number, ease?: string, autoStart?: boolean, delay?: number, repeat?: number, yoyo?: boolean): Phaser.Tween; @@ -23206,9 +23206,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * It ignores delay and repeat counts and any chained tweens, but does include child tweens. * Just one play through of the tween data is returned, including yoyo if set. * - * @param frameRate - The speed in frames per second that the data should be generated at. The higher the value, the larger the array it creates. - Default: 60 - * @param data - If given the generated data will be appended to this array, otherwise a new array will be returned. - * @return - An array of tweened values. + * @param frameRate The speed in frames per second that the data should be generated at. The higher the value, the larger the array it creates. - Default: 60 + * @param data If given the generated data will be appended to this array, otherwise a new array will be returned. + * @return An array of tweened values. */ generateData(frameRate?: number, data?: any): any[]; @@ -23218,9 +23218,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The interpolation function is only used if the target properties is an array. * If you have child tweens and pass -1 as the index value it sets the interpolation function across all of them. * - * @param interpolation - The interpolation function to use (Phaser.Math.linearInterpolation by default) - * @param index - If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the easing function on all children. - Default: 0 - * @return - This tween. Useful for method chaining. + * @param interpolation The interpolation function to use (Phaser.Math.linearInterpolation by default) + * @param index If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the easing function on all children. - Default: 0 + * @return This tween. Useful for method chaining. */ interpolation(interpolation: Function, index?: number): Phaser.Tween; @@ -23236,17 +23236,17 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * .to({ y: 0 }, 1000, Phaser.Easing.Linear.None) * .loop(); * - * @param value - If `true` this tween and any child tweens will loop once they reach the end. Set to `false` to remove an active loop. - Default: true - * @return - This tween. Useful for method chaining. + * @param value If `true` this tween and any child tweens will loop once they reach the end. Set to `false` to remove an active loop. - Default: true + * @return This tween. Useful for method chaining. */ loop(value?: boolean): Phaser.Tween; /** * Sets a callback to be fired each time this tween updates. * - * @param callback - The callback to invoke each time this tween is updated. Set to `null` to remove an already active callback. - * @param callbackContext - The context in which to call the onUpdate callback. - * @return - This tween. Useful for method chaining. + * @param callback The callback to invoke each time this tween is updated. Set to `null` to remove an already active callback. + * @param callbackContext The context in which to call the onUpdate callback. + * @return This tween. Useful for method chaining. */ onUpdateCallback(callback: Function, callbackContext: any): Phaser.Tween; @@ -23261,9 +23261,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If you have child tweens and pass -1 as the index value it sets the number of times they'll repeat across all of them. * If you wish to define how many times this Tween and all children will repeat see Tween.repeatAll. * - * @param total - How many times a tween should repeat before completing. Set to zero to remove an active repeat. Set to -1 to repeat forever. - * @param index - If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the repeat value on all the children. - Default: 0 - * @return - This tween. Useful for method chaining. + * @param total How many times a tween should repeat before completing. Set to zero to remove an active repeat. Set to -1 to repeat forever. + * @param index If this tween has more than one child this allows you to target a specific child. If set to -1 it will set the repeat value on all the children. - Default: 0 + * @return This tween. Useful for method chaining. */ repeat(total: number, index?: number): Phaser.Tween; repeatAll(total?: number): Phaser.Tween; @@ -23278,8 +23278,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * This sets the `Tween.isRunning` property to `true` and dispatches a `Tween.onStart` signal. * If the Tween has a delay set then nothing will start tweening until the delay has expired. * - * @param index - If this Tween contains child tweens you can specify which one to start from. The default is zero, i.e. the first tween created. - Default: 0 - * @return - This tween. Useful for method chaining. + * @param index If this Tween contains child tweens you can specify which one to start from. The default is zero, i.e. the first tween created. - Default: 0 + * @return This tween. Useful for method chaining. */ start(index?: number): Phaser.Tween; @@ -23288,8 +23288,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If called directly the `Tween.onComplete` signal is not dispatched and no chained tweens are started unless the complete parameter is set to `true`. * If you just wish to pause a tween then use Tween.pause instead. * - * @param complete - Set to `true` to dispatch the Tween.onComplete signal. - Default: false - * @return - This tween. Useful for method chaining. + * @param complete Set to `true` to dispatch the Tween.onComplete signal. - Default: false + * @return This tween. Useful for method chaining. */ stop(complete?: boolean): Phaser.Tween; @@ -23299,14 +23299,14 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". * ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types. * - * @param properties - An object containing the properties you want to tween., such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object. - * @param duration - Duration of this tween in ms. - Default: 1000 - * @param ease - Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden. - Default: null - * @param autoStart - Set to `true` to allow this tween to start automatically. Otherwise call Tween.start(). - Default: false - * @param delay - Delay before this tween will start in milliseconds. Defaults to 0, no delay. - Default: 0 - * @param repeat - Should the tween automatically restart once complete? If you want it to run forever set as -1. This only effects this induvidual tween, not any chained tweens. - Default: 0 - * @param yoyo - A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead. - Default: false - * @return - This Tween object. + * @param properties An object containing the properties you want to tween., such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object. + * @param duration Duration of this tween in ms. - Default: 1000 + * @param ease Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden. - Default: null + * @param autoStart Set to `true` to allow this tween to start automatically. Otherwise call Tween.start(). - Default: false + * @param delay Delay before this tween will start in milliseconds. Defaults to 0, no delay. - Default: 0 + * @param repeat Should the tween automatically restart once complete? If you want it to run forever set as -1. This only effects this induvidual tween, not any chained tweens. - Default: 0 + * @param yoyo A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead. - Default: false + * @return This Tween object. */ to(properties: any, duration?: number, ease?: Function, autoStart?: boolean, delay?: number, repeat?: number, yoyo?: boolean): Phaser.Tween; @@ -23316,22 +23316,22 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * The ease function allows you define the rate of change. You can pass either a function such as Phaser.Easing.Circular.Out or a string such as "Circ". * ".easeIn", ".easeOut" and "easeInOut" variants are all supported for all ease types. * - * @param properties - An object containing the properties you want to tween., such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object. - * @param duration - Duration of this tween in ms. - Default: 1000 - * @param ease - Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden. - Default: null - * @param autoStart - Set to `true` to allow this tween to start automatically. Otherwise call Tween.start(). - Default: false - * @param delay - Delay before this tween will start in milliseconds. Defaults to 0, no delay. - Default: 0 - * @param repeat - Should the tween automatically restart once complete? If you want it to run forever set as -1. This only effects this induvidual tween, not any chained tweens. - Default: 0 - * @param yoyo - A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead. - Default: false - * @return - This Tween object. + * @param properties An object containing the properties you want to tween., such as `Sprite.x` or `Sound.volume`. Given as a JavaScript object. + * @param duration Duration of this tween in ms. - Default: 1000 + * @param ease Easing function. If not set it will default to Phaser.Easing.Default, which is Phaser.Easing.Linear.None by default but can be over-ridden. - Default: null + * @param autoStart Set to `true` to allow this tween to start automatically. Otherwise call Tween.start(). - Default: false + * @param delay Delay before this tween will start in milliseconds. Defaults to 0, no delay. - Default: 0 + * @param repeat Should the tween automatically restart once complete? If you want it to run forever set as -1. This only effects this induvidual tween, not any chained tweens. - Default: 0 + * @param yoyo A tween that yoyos will reverse itself and play backwards automatically. A yoyo'd tween doesn't fire the Tween.onComplete event, so listen for Tween.onLoop instead. - Default: false + * @return This Tween object. */ to(properties: any, duration?: number, ease?: string, autoStart?: boolean, delay?: number, repeat?: number, yoyo?: boolean): Phaser.Tween; /** * Core tween update function called by the TweenManager. Does not need to be invoked directly. * - * @param time - A timestamp passed in by the TweenManager. - * @return - false if the tween and all child tweens have completed and should be deleted from the manager, otherwise true (still active). + * @param time A timestamp passed in by the TweenManager. + * @return false if the tween and all child tweens have completed and should be deleted from the manager, otherwise true (still active). */ update(time: number): boolean; @@ -23342,9 +23342,9 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If you have child tweens and pass -1 as the index value it sets the yoyo property across all of them. * If you wish to yoyo this Tween and all of its children then see Tween.yoyoAll. * - * @param enable - Set to true to yoyo this tween, or false to disable an already active yoyo. - * @param index - If this tween has more than one child this allows you to target a specific child. If set to -1 it will set yoyo on all the children. - Default: 0 - * @return - This tween. Useful for method chaining. + * @param enable Set to true to yoyo this tween, or false to disable an already active yoyo. + * @param index If this tween has more than one child this allows you to target a specific child. If set to -1 it will set yoyo on all the children. - Default: 0 + * @return This tween. Useful for method chaining. */ yoyo(enable: boolean, index?: number): Phaser.Tween; @@ -23364,7 +23364,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * starting and ending values, the ease function, interpolation and duration. The Tween acts as a timeline manager for * TweenData objects and can contain multiple TweenData objects. * - * @param parent - The Tween that owns this TweenData object. + * @param parent The Tween that owns this TweenData object. */ constructor(parent: Phaser.Tween); @@ -23464,27 +23464,27 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * It works by running the tween simulation at the given frame rate based on the values set-up in Tween.to and Tween.from. * Just one play through of the tween data is returned, including yoyo if set. * - * @param frameRate - The speed in frames per second that the data should be generated at. The higher the value, the larger the array it creates. - Default: 60 - * @return - An array of tweened values. + * @param frameRate The speed in frames per second that the data should be generated at. The higher the value, the larger the array it creates. - Default: 60 + * @return An array of tweened values. */ generateData(frameRate?: number): any[]; /** * Checks if this Tween is meant to repeat or yoyo and handles doing so. - * @return - Either Phaser.TweenData.LOOPED or Phaser.TweenData.COMPLETE. + * @return Either Phaser.TweenData.LOOPED or Phaser.TweenData.COMPLETE. */ repeat(): number; /** * Starts the Tween running. - * @return - This Tween object. + * @return This Tween object. */ start(): Phaser.TweenData; to(properties: any, duration?: number, ease?: Function, delay?: number, repeat?: number, yoyo?: boolean): Phaser.TweenData; /** * Updates this Tween. This is called automatically by Phaser.Tween. - * @return - The current status of this Tween. One of the Phaser.TweenData constants: PENDING, RUNNING, LOOPED or COMPLETE. + * @return The current status of this Tween. One of the Phaser.TweenData constants: PENDING, RUNNING, LOOPED or COMPLETE. */ update(): number; @@ -23512,7 +23512,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * It also has callbacks swapped for Signals and a few issues patched with regard to properties and completion errors. * Please see https://github.com/sole/tween.js for a full list of contributors. * - * @param game - A reference to the currently running game. + * @param game A reference to the currently running game. */ constructor(game: Phaser.Game); @@ -23526,37 +23526,37 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Add a new tween into the TweenManager. * - * @param tween - The tween object you want to add. - * @return - The tween object you added to the manager. + * @param tween The tween object you want to add. + * @return The tween object you added to the manager. */ add(tween: Phaser.Tween): Phaser.Tween; /** * Create a tween object for a specific object. The object can be any JavaScript object or Phaser object such as Sprite. * - * @param object - Object the tween will be run on. - * @return - The newly created tween object. + * @param object Object the tween will be run on. + * @return The newly created tween object. */ create(object: any): Phaser.Tween; /** * Get all the tween objects in an array. - * @return - Array with all tween objects. + * @return Array with all tween objects. */ getAll(): Phaser.Tween[]; /** * Checks to see if a particular Sprite is currently being tweened. * - * @param object - The object to check for tweens against. - * @return - Returns true if the object is currently being tweened, false if not. + * @param object The object to check for tweens against. + * @return Returns true if the object is currently being tweened, false if not. */ isTweening(object: any): boolean; /** * Remove a tween from this manager. * - * @param tween - The tween object you want to remove. + * @param tween The tween object you want to remove. */ remove(tween: Phaser.Tween): Phaser.Tween; @@ -23568,8 +23568,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Remove all tweens from a specific object, array of objects or Group. * - * @param obj - The object you want to remove the tweens from. - * @param children - If passing a group, setting this to true will remove the tweens from all of its children instead of the group itself. - Default: true + * @param obj The object you want to remove the tweens from. + * @param children If passing a group, setting this to true will remove the tweens from all of its children instead of the group itself. - Default: true */ removeFrom(obj: any, children?: boolean): void; @@ -23580,7 +23580,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Update all the tween objects you added to this manager. - * @return - Return false if there's no tween to update, otherwise return true. + * @return Return false if there's no tween to update, otherwise return true. */ update(): boolean; @@ -23597,18 +23597,18 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * This is a slightly modified version of http://api.jquery.com/jQuery.extend/ * - * @param deep - Perform a deep copy? - * @param target - The target object to copy to. - * @return - The extended object. + * @param deep Perform a deep copy? + * @param target The target object to copy to. + * @return The extended object. */ static extend(deep: boolean, target: any): any; /** * Gets an objects property by string. * - * @param obj - The object to traverse. - * @param prop - The property whose value will be returned. - * @return - the value of the property or null if property isn't found . + * @param obj The object to traverse. + * @param prop The property whose value will be returned. + * @return the value of the property or null if property isn't found . */ static getProperty(obj: any, prop: string): any; @@ -23616,8 +23616,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * This is a slightly modified version of jQuery.isPlainObject. * A plain object is an object whose internal class property is [object Object]. * - * @param obj - The object to inspect. - * @return - - true if the object is plain, otherwise false. + * @param obj The object to inspect. + * @return - true if the object is plain, otherwise false. */ static isPlainObject(object: any): boolean; @@ -23625,29 +23625,29 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Mixes the source object into the destination object, returning the newly modified destination object. * Based on original code by @mudcube * - * @param from - The object to copy (the source object). - * @param to - The object to copy to (the destination object). - * @return - The modified destination object. + * @param from The object to copy (the source object). + * @param to The object to copy to (the destination object). + * @return The modified destination object. */ static mixin(from: any, to: any): any; /** * Javascript string pad http://www.webtoolkit.info/. * - * @param str - The target string. - * @param len - The number of characters to be added. - * @param pad - The string to pad it out with (defaults to a space). - * @param dir - The direction dir = 1 (left), 2 (right), 3 (both). - Default: 3 - * @return - The padded string + * @param str The target string. + * @param len The number of characters to be added. + * @param pad The string to pad it out with (defaults to a space). + * @param dir The direction dir = 1 (left), 2 (right), 3 (both). - Default: 3 + * @return The padded string */ static pad(str: string, len: number, pad: number, dir?: number): string; /** * Get a unit dimension from a string. * - * @param size - The size to parse. - * @param dimension - The window dimension to check. - * @return - The parsed dimension. + * @param size The size to parse. + * @param dimension The window dimension to check. + * @return The parsed dimension. */ static parseDimension(size: any, dimension: number): number; @@ -23656,34 +23656,34 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * * Based on the routine from {@link http://jsfiddle.net/MrPolywhirl/NH42z/}. * - * @param matrix - The array to rotate; this matrix _may_ be altered. - * @param direction - The amount to rotate: the roation in degrees (90, -90, 270, -270, 180) or a string command ('rotateLeft', 'rotateRight' or 'rotate180'). - * @return - The rotated matrix. The source matrix should be discarded for the returned matrix. + * @param matrix The array to rotate; this matrix _may_ be altered. + * @param direction The amount to rotate: the roation in degrees (90, -90, 270, -270, 180) or a string command ('rotateLeft', 'rotateRight' or 'rotate180'). + * @return The rotated matrix. The source matrix should be discarded for the returned matrix. */ static rotateArray(array: T[], direction: any): T; /** * Sets an objects property by string. * - * @param obj - The object to traverse - * @param prop - The property whose value will be changed - * @return - The object on which the property was set. + * @param obj The object to traverse + * @param prop The property whose value will be changed + * @return The object on which the property was set. */ static setProperty(obj: any, prop: string, value: any): any; /** * A standard Fisher-Yates Array shuffle implementation. * - * @param array - The array to shuffle. - * @return - The shuffled array. + * @param array The array to shuffle. + * @return The shuffled array. */ static shuffle(array: T[]): T[]; /** * Transposes the elements of the given matrix (array of arrays). * - * @param array - The matrix to transpose. - * @return - A new transposed matrix + * @param array The matrix to transpose. + * @return A new transposed matrix */ static transposeArray(array: T[]): T[]; @@ -23709,7 +23709,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * in WebGL mode if you really need it (or your desktop can cope with it well) and disable it for production! * If your game is using a Canvas renderer then the debug information is literally drawn on the top of the active game canvas and no Sprite is used. * - * @param game - A reference to the currently running game. + * @param game A reference to the currently running game. */ constructor(game: Phaser.Game); @@ -23795,19 +23795,19 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Ninja (AABB, circle only) Physics. * To display a P2 body you should enable debug mode on the body when creating it. * - * @param sprite - The sprite whos body will be rendered. - * @param color - color of the debug info to be rendered. (format is css color string). - Default: 'rgba(0,255,0,0.4)' - * @param filled - Render the objected as a filled (default, true) or a stroked (false) - Default: true + * @param sprite The sprite whos body will be rendered. + * @param color color of the debug info to be rendered. (format is css color string). - Default: 'rgba(0,255,0,0.4)' + * @param filled Render the objected as a filled (default, true) or a stroked (false) - Default: true */ body(sprite: Phaser.Sprite, color?: string, filled?: boolean): void; /** * Render a Sprites Physic Body information. * - * @param sprite - The sprite to be rendered. - * @param x - X position of the debug info to be rendered. - * @param y - Y position of the debug info to be rendered. - * @param color - color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' + * @param sprite The sprite to be rendered. + * @param x X position of the debug info to be rendered. + * @param y Y position of the debug info to be rendered. + * @param color color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' */ bodyInfo(sprite: Phaser.Sprite, x: number, y: Number, color?: string): void; @@ -23815,8 +23815,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Renders 'debug draw' data for the given Box2D body. * This uses the standard debug drawing feature of Box2D, so colors will be decided by the Box2D engine. * - * @param sprite - The sprite whos body will be rendered. - * @param color - color of the debug info to be rendered. (format is css color string). - Default: 'rgb(0,255,0)' + * @param sprite The sprite whos body will be rendered. + * @param color color of the debug info to be rendered. (format is css color string). - Default: 'rgb(0,255,0)' */ box2dBody(body: Phaser.Sprite, color?: string): void; @@ -23830,49 +23830,49 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Render camera information including dimensions and location. * - * @param camera - The Phaser.Camera to show the debug information for. - * @param x - X position of the debug info to be rendered. - * @param y - Y position of the debug info to be rendered. - * @param color - color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' + * @param camera The Phaser.Camera to show the debug information for. + * @param x X position of the debug info to be rendered. + * @param y Y position of the debug info to be rendered. + * @param color color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' */ cameraInfo(camera: Phaser.Camera, x: number, y: number, color?: string): void; /** * Renders a Phaser geometry object including Rectangle, Circle, Point or Line. * - * @param object - The geometry object to render. - * @param color - Color of the debug info to be rendered (format is css color string). - * @param filled - Render the objected as a filled (default, true) or a stroked (false) - Default: true - * @param forceType - Force rendering of a specific type. If 0 no type will be forced, otherwise 1 = Rectangle, 2 = Circle, 3 = Point and 4 = Line. - Default: 0 + * @param object The geometry object to render. + * @param color Color of the debug info to be rendered (format is css color string). + * @param filled Render the objected as a filled (default, true) or a stroked (false) - Default: true + * @param forceType Force rendering of a specific type. If 0 no type will be forced, otherwise 1 = Rectangle, 2 = Circle, 3 = Point and 4 = Line. - Default: 0 */ geom(object: any, color?: string, fiiled?: boolean, forceType?: number): void; /** * Render debug information about the Input object. * - * @param x - X position of the debug info to be rendered. - * @param y - Y position of the debug info to be rendered. - * @param color - color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' + * @param x X position of the debug info to be rendered. + * @param y Y position of the debug info to be rendered. + * @param color color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' */ inputInfo(x: number, y: number, color?: string): void; /** * Renders Line information in the given color. * - * @param line - The Line to display the data for. - * @param x - X position of the debug info to be rendered. - * @param y - Y position of the debug info to be rendered. - * @param color - color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' + * @param line The Line to display the data for. + * @param x X position of the debug info to be rendered. + * @param y Y position of the debug info to be rendered. + * @param color color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' */ lineInfo(line: Phaser.Line, x: number, y: number, color?: string): void; /** * Renders Phaser.Key object information. * - * @param key - The Key to render the information for. - * @param x - X position of the debug info to be rendered. - * @param y - Y position of the debug info to be rendered. - * @param color - color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' + * @param key The Key to render the information for. + * @param x X position of the debug info to be rendered. + * @param y Y position of the debug info to be rendered. + * @param color color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' */ key(key: Phaser.Key, x?: number, y?: number, color?: string): void; @@ -23889,29 +23889,29 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Renders a single pixel at the given size. * - * @param x - X position of the pixel to be rendered. - * @param y - Y position of the pixel to be rendered. - * @param color - Color of the pixel (format is css color string). - * @param size - The 'size' to render the pixel at. - Default: 2 + * @param x X position of the pixel to be rendered. + * @param y Y position of the pixel to be rendered. + * @param color Color of the pixel (format is css color string). + * @param size The 'size' to render the pixel at. - Default: 2 */ pixel(x: number, y: number, color?: string, size?: number): void; /** * Renders the Pointer.circle object onto the stage in green if down or red if up along with debug text. * - * @param pointer - The Pointer you wish to display. - * @param hideIfUp - Doesn't render the circle if the pointer is up. - Default: false - * @param downColor - The color the circle is rendered in if down. - Default: 'rgba(0,255,0,0.5)' - * @param upColor - The color the circle is rendered in if up (and hideIfUp is false). - Default: 'rgba(255,0,0,0.5)' - * @param color - color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' + * @param pointer The Pointer you wish to display. + * @param hideIfUp Doesn't render the circle if the pointer is up. - Default: false + * @param downColor The color the circle is rendered in if down. - Default: 'rgba(0,255,0,0.5)' + * @param upColor The color the circle is rendered in if up (and hideIfUp is false). - Default: 'rgba(255,0,0,0.5)' + * @param color color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' */ pointer(pointer: Phaser.Pointer, hideIfUp?: boolean, downColor?: string, upColor?: string, color?: string): void; /** * Visually renders a QuadTree to the display. * - * @param quadtree - The quadtree to render. - * @param color - The color of the lines in the quadtree. + * @param quadtree The quadtree to render. + * @param color The color of the lines in the quadtree. */ quadTree(quadtree: Phaser.QuadTree, color?: string): void; rectangle(object: Phaser.Rectangle, color?: string, filled?: boolean): void; @@ -23924,68 +23924,68 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Renders the Rope's segments. Note: This is really expensive as it has to calculate new segments everytime you call it * - * @param rope - The rope to display the segments of. - * @param color - Color of the debug info to be rendered (format is css color string). - * @param filled - Render the rectangle as a fillRect (default, true) or a strokeRect (false) - Default: true + * @param rope The rope to display the segments of. + * @param color Color of the debug info to be rendered (format is css color string). + * @param filled Render the rectangle as a fillRect (default, true) or a strokeRect (false) - Default: true */ ropeSegments(rope: Phaser.Rope, color?: number, filled?: boolean): void; /** * Render Sound information, including decoded state, duration, volume and more. * - * @param sound - The sound object to debug. - * @param x - X position of the debug info to be rendered. - * @param y - Y position of the debug info to be rendered. - * @param color - color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' + * @param sound The sound object to debug. + * @param x X position of the debug info to be rendered. + * @param y Y position of the debug info to be rendered. + * @param color color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' */ soundInfo(sound: Phaser.Sound, x: number, y: number, color?: string): void; /** * Renders the Sprites bounds. Note: This is really expensive as it has to calculate the bounds every time you call it! * - * @param sprite - The sprite to display the bounds of. - * @param color - Color of the debug info to be rendered (format is css color string). - * @param filled - Render the rectangle as a fillRect (default, true) or a strokeRect (false) - Default: true + * @param sprite The sprite to display the bounds of. + * @param color Color of the debug info to be rendered (format is css color string). + * @param filled Render the rectangle as a fillRect (default, true) or a strokeRect (false) - Default: true */ spriteBounds(sprite: any, color?: string, filled?: boolean): void; /** * Renders the sprite coordinates in local, positional and world space. * - * @param sprite - The sprite to display the coordinates for. - * @param x - X position of the debug info to be rendered. - * @param y - Y position of the debug info to be rendered. - * @param color - color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' + * @param sprite The sprite to display the coordinates for. + * @param x X position of the debug info to be rendered. + * @param y Y position of the debug info to be rendered. + * @param color color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' */ spriteCoords(sprite: any, x: number, y: number, color?: string): void; /** * Render debug infos (including name, bounds info, position and some other properties) about the Sprite. * - * @param sprite - The Sprite to display the information of. - * @param x - X position of the debug info to be rendered. - * @param y - Y position of the debug info to be rendered. - * @param color - color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' + * @param sprite The Sprite to display the information of. + * @param x X position of the debug info to be rendered. + * @param y Y position of the debug info to be rendered. + * @param color color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' */ spriteInfo(sprite: Phaser.Sprite, x: number, y: number, color?: string): void; /** * Render Sprite Input Debug information. * - * @param sprite - The sprite to display the input data for. - * @param x - X position of the debug info to be rendered. - * @param y - Y position of the debug info to be rendered. - * @param color - color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' + * @param sprite The sprite to display the input data for. + * @param x X position of the debug info to be rendered. + * @param y Y position of the debug info to be rendered. + * @param color color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' */ spriteInputInfo(sprite: Phaser.Sprite, x: number, y: number, color?: string): void; /** * Internal method that resets and starts the debug output values. * - * @param x - The X value the debug info will start from. - Default: 0 - * @param y - The Y value the debug info will start from. - Default: 0 - * @param color - The color the debug text will drawn in. - Default: 'rgb(255,255,255)' - * @param columnWidth - The spacing between columns. - Default: 0 + * @param x The X value the debug info will start from. - Default: 0 + * @param y The Y value the debug info will start from. - Default: 0 + * @param color The color the debug text will drawn in. - Default: 'rgb(255,255,255)' + * @param columnWidth The spacing between columns. - Default: 0 */ start(x?: number, y?: number, color?: string, columnWidth?: number): void; @@ -23997,21 +23997,21 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Render a string of text. * - * @param text - The line of text to draw. - * @param x - X position of the debug info to be rendered. - * @param y - Y position of the debug info to be rendered. - * @param color - Color of the debug info to be rendered (format is css color string). - * @param font - The font of text to draw. + * @param text The line of text to draw. + * @param x X position of the debug info to be rendered. + * @param y Y position of the debug info to be rendered. + * @param color Color of the debug info to be rendered (format is css color string). + * @param font The font of text to draw. */ text(text: string, x: number, y: number, color?: string, font?: string): void; /** * Render Timer information. * - * @param timer - The Phaser.Timer to show the debug information for. - * @param x - X position of the debug info to be rendered. - * @param y - Y position of the debug info to be rendered. - * @param color - color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' + * @param timer The Phaser.Timer to show the debug information for. + * @param x X position of the debug info to be rendered. + * @param y Y position of the debug info to be rendered. + * @param color color of the debug info to be rendered. (format is css color string). - Default: 'rgb(255,255,255)' */ timer(timer: Phaser.Timer, x: number, y: number, color?: string): void; @@ -24037,7 +24037,7 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * by stage limits and can be any size. You look into the world via cameras. All game objects live within * the world at world-based coordinates. By default a world is created the same size as your Stage. * - * @param game - Reference to the current game instance. + * @param game Reference to the current game instance. */ constructor(game: Phaser.Game); @@ -24096,8 +24096,8 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal /** * Updates the size of this world. Note that this doesn't modify the world x/y coordinates, just the width and height. * - * @param width - New width of the game world in pixels. - * @param height - New height of the game world in pixels. + * @param width New width of the game world in pixels. + * @param height New height of the game world in pixels. */ resize(width: number, height: number): void; @@ -24105,10 +24105,10 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * Updates the size of this world. Note that this doesn't modify the world x/y coordinates, just the width and height. * The Camera bounds and Physics bounds (if set) are also updated to match the new World bounds. * - * @param x - Top left most corner of the world. - * @param y - Top left most corner of the world. - * @param width - New width of the game world in pixels. - * @param height - New height of the game world in pixels. + * @param x Top left most corner of the world. + * @param y Top left most corner of the world. + * @param width New width of the game world in pixels. + * @param height New height of the game world in pixels. */ setBounds(x: number, y: number, width: number, height: number): void; @@ -24122,11 +24122,11 @@ onConnectCallback, onDisconnectCallback, onDownCallback, onUpCallback, onAxisCal * If they do it will reposition the object to the opposite side of the world, creating a wrap-around effect. * If sprite has a P2 body then the body (sprite.body) should be passed as first parameter to the function. * - * @param sprite - The object you wish to wrap around the world bounds. - * @param padding - Extra padding added equally to the sprite.x and y coordinates before checking if within the world bounds. Ignored if useBounds is true. - Default: 0 - * @param useBounds - If useBounds is false wrap checks the object.x/y coordinates. If true it does a more accurate bounds check, which is more expensive. - Default: false - * @param horizontal - If horizontal is false, wrap will not wrap the object.x coordinates horizontally. - Default: true - * @param vertical - If vertical is false, wrap will not wrap the object.y coordinates vertically. - Default: true + * @param sprite The object you wish to wrap around the world bounds. + * @param padding Extra padding added equally to the sprite.x and y coordinates before checking if within the world bounds. Ignored if useBounds is true. - Default: 0 + * @param useBounds If useBounds is false wrap checks the object.x/y coordinates. If true it does a more accurate bounds check, which is more expensive. - Default: false + * @param horizontal If horizontal is false, wrap will not wrap the object.x coordinates horizontally. - Default: true + * @param vertical If vertical is false, wrap will not wrap the object.y coordinates vertically. - Default: true */ wrap(sprite: any, padding?: number, useBounds?: boolean, horizontal?: boolean, vertical?: boolean): void; @@ -24271,13 +24271,13 @@ declare module p2 { /** * A constraint that tries to keep the distance between two bodies constant. * - * @param world - A reference to the P2 World. - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param distance - The distance to keep between the bodies. - * @param localAnchorA - The anchor point for bodyA, defined locally in bodyA frame. Defaults to [0,0]. - * @param localAnchorB - The anchor point for bodyB, defined locally in bodyB frame. Defaults to [0,0]. - * @param maxForce - Maximum force to apply. - Default: Number.MAX_VALUE + * @param world A reference to the P2 World. + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param distance The distance to keep between the bodies. + * @param localAnchorA The anchor point for bodyA, defined locally in bodyA frame. Defaults to [0,0]. + * @param localAnchorB The anchor point for bodyB, defined locally in bodyB frame. Defaults to [0,0]. + * @param maxForce Maximum force to apply. - Default: Number.MAX_VALUE */ constructor(bodyA: Body, bodyB: Body, type: number, options?: { collideConnected?: boolean; @@ -24313,11 +24313,11 @@ declare module p2 { /** * Connects two bodies at given offset points, letting them rotate relative to each other around this point. * - * @param world - A reference to the P2 World. - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param angle - The relative angle - Default: 0 - * @param ratio - The gear ratio. - Default: 1 + * @param world A reference to the P2 World. + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param angle The relative angle - Default: 0 + * @param ratio The gear ratio. - Default: 1 */ constructor(bodyA: Body, bodyB: Body, type: number, options?: { collideConnected?: boolean; @@ -24345,12 +24345,12 @@ declare module p2 { /** * Locks the relative position between two bodies. * - * @param world - A reference to the P2 World. - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param offset - The offset of bodyB in bodyA's frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param angle - The angle of bodyB in bodyA's frame. - Default: 0 - * @param maxForce - The maximum force that should be applied to constrain the bodies. + * @param world A reference to the P2 World. + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param offset The offset of bodyB in bodyA's frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param angle The angle of bodyB in bodyA's frame. - Default: 0 + * @param maxForce The maximum force that should be applied to constrain the bodies. */ constructor(bodyA: Body, bodyB: Body, type: number, options?: { collideConnected?: boolean; @@ -24375,14 +24375,14 @@ declare module p2 { /** * Connects two bodies at given offset points, letting them rotate relative to each other around this point. * - * @param world - A reference to the P2 World. - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param lockRotation - If set to false, bodyB will be free to rotate around its anchor point. - Default: true - * @param anchorA - Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param anchorB - Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param axis - An axis, defined in body A frame, that body B's anchor point may slide along. The value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param maxForce - The maximum force that should be applied to constrain the bodies. + * @param world A reference to the P2 World. + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param lockRotation If set to false, bodyB will be free to rotate around its anchor point. - Default: true + * @param anchorA Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param anchorB Body A's anchor point, defined in its own local frame. The value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param axis An axis, defined in body A frame, that body B's anchor point may slide along. The value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param maxForce The maximum force that should be applied to constrain the bodies. */ constructor(bodyA: Body, bodyB: Body, type: number, options?: { collideConnected?: boolean; @@ -24429,13 +24429,13 @@ declare module p2 { * Connects two bodies at given offset points, letting them rotate relative to each other around this point. * The pivot points are given in world (pixel) coordinates. * - * @param world - A reference to the P2 World. - * @param bodyA - First connected body. - * @param pivotA - The point relative to the center of mass of bodyA which bodyA is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param bodyB - Second connected body. - * @param pivotB - The point relative to the center of mass of bodyB which bodyB is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param maxForce - The maximum force that should be applied to constrain the bodies. - Default: 0 - * @param worldPivot - A pivot point given in world coordinates. If specified, localPivotA and localPivotB are automatically computed from this value. - Default: null + * @param world A reference to the P2 World. + * @param bodyA First connected body. + * @param pivotA The point relative to the center of mass of bodyA which bodyA is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param bodyB Second connected body. + * @param pivotB The point relative to the center of mass of bodyB which bodyB is constrained to. The value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param maxForce The maximum force that should be applied to constrain the bodies. - Default: 0 + * @param worldPivot A pivot point given in world coordinates. If specified, localPivotA and localPivotB are automatically computed from this value. - Default: null */ constructor(bodyA: Body, bodyB: Body, type: number, options?: { collideConnected?: boolean; @@ -24603,9 +24603,9 @@ declare module p2 { /** * Defines a physics material * - * @param materialA - First material participating in the contact material. - * @param materialB - Second material participating in the contact material. - * @param options - Additional configuration options. + * @param materialA First material participating in the contact material. + * @param materialB Second material participating in the contact material. + * @param options Additional configuration options. */ constructor(materialA: Material, materialB: Material, options?: ContactMaterialOptions); @@ -24639,7 +24639,7 @@ declare module p2 { * * \o/ ~ "Because I'm a Material girl" * - * @param name - The user defined name given to this Material. + * @param name The user defined name given to this Material. */ constructor(id: number); @@ -24749,11 +24749,11 @@ declare module p2 { * Note: When bound to a Sprite to avoid single-pixel jitters on mobile devices we strongly recommend using Sprite sizes that are even on both axis, i.e. 128x128 not 127x127. * Note: When a game object is given a P2 body it has its anchor x/y set to 0.5, so it becomes centered. * - * @param game - Game reference to the currently running game. - * @param sprite - The Sprite object this physics body belongs to. - * @param x - The x coordinate of this Body. - Default: 0 - * @param y - The y coordinate of this Body. - Default: 0 - * @param mass - The default mass of this Body (0 = static). - Default: 1 + * @param game Game reference to the currently running game. + * @param sprite The Sprite object this physics body belongs to. + * @param x The x coordinate of this Body. - Default: 0 + * @param y The y coordinate of this Body. - Default: 0 + * @param mass The default mass of this Body (0 = static). - Default: 1 */ constructor(options?: BodyOptions); @@ -24867,19 +24867,19 @@ declare module p2 { * Add a shape to the body. You can pass a local transform when adding a shape, so that the shape gets an offset and an angle relative to the body center of mass. * Will automatically update the mass properties and bounding radius. * - * @param shape - The shape to add to the body. - * @param offsetX - Local horizontal offset of the shape relative to the body center of mass. - Default: 0 - * @param offsetY - Local vertical offset of the shape relative to the body center of mass. - Default: 0 - * @param rotation - Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 - * @return - The shape that was added to the body. + * @param shape The shape to add to the body. + * @param offsetX Local horizontal offset of the shape relative to the body center of mass. - Default: 0 + * @param offsetY Local vertical offset of the shape relative to the body center of mass. - Default: 0 + * @param rotation Local rotation of the shape relative to the body center of mass, specified in radians. - Default: 0 + * @return The shape that was added to the body. */ addShape(shape: Shape, offset?: number[], angle?: number): void; /** * Remove a shape from the body. Will automatically update the mass properties and bounding radius. * - * @param shape - The shape to remove from the body. - * @return - True if the shape was found and removed, else false. + * @param shape The shape to remove from the body. + * @return True if the shape was found and removed, else false. */ removeShape(shape: Shape): boolean; updateMassProperties(): void; @@ -24887,25 +24887,25 @@ declare module p2 { /** * Apply force to a world point. This could for example be a point on the RigidBody surface. Applying force this way will add to Body.force and Body.angularForce. * - * @param force - The force vector to add. - * @param worldX - The world x point to apply the force on. - * @param worldY - The world y point to apply the force on. + * @param force The force vector to add. + * @param worldX The world x point to apply the force on. + * @param worldY The world y point to apply the force on. */ applyForce(force: number[], worldPoint: number[]): void; /** * Transform a world point to local body frame. * - * @param out - The vector to store the result in. - * @param worldPoint - The input world vector. + * @param out The vector to store the result in. + * @param worldPoint The input world vector. */ toLocalFrame(out: number[], worldPoint: number[]): void; /** * Transform a local point to world frame. * - * @param out - The vector to store the result in. - * @param localPoint - The input local vector. + * @param out The vector to store the result in. + * @param localPoint The input local vector. */ toWorldFrame(out: number[], localPoint: number[]): void; fromPolygon(path: number[][], options?: { @@ -24928,7 +24928,7 @@ declare module p2 { /** * Apply damping, see http://code.google.com/p/bullet/issues/detail?id=74 for details. * - * @param dt - Current time step. + * @param dt Current time step. */ applyDamping(dy: number): void; wakeUp(): void; @@ -24950,16 +24950,16 @@ declare module p2 { /** * Creates a linear spring, connecting two bodies. A spring can have a resting length, a stiffness and damping. * - * @param world - A reference to the P2 World. - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param restLength - Rest length of the spring. A number > 0. - Default: 1 - * @param stiffness - Stiffness of the spring. A number >= 0. - Default: 100 - * @param damping - Damping of the spring. A number >= 0. - Default: 1 - * @param worldA - Where to hook the spring to body A in world coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param worldB - Where to hook the spring to body B in world coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param localA - Where to hook the spring to body A in local body coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. - * @param localB - Where to hook the spring to body B in local body coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param world A reference to the P2 World. + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param restLength Rest length of the spring. A number > 0. - Default: 1 + * @param stiffness Stiffness of the spring. A number >= 0. - Default: 100 + * @param damping Damping of the spring. A number >= 0. - Default: 1 + * @param worldA Where to hook the spring to body A in world coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param worldB Where to hook the spring to body B in world coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param localA Where to hook the spring to body A in local body coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. + * @param localB Where to hook the spring to body B in local body coordinates. This value is an array with 2 elements matching x and y, i.e: [32, 32]. */ constructor(bodyA: Body, bodyB: Body, options?: { @@ -25005,12 +25005,12 @@ declare module p2 { /** * Creates a rotational spring, connecting two bodies. A spring can have a resting length, a stiffness and damping. * - * @param world - A reference to the P2 World. - * @param bodyA - First connected body. - * @param bodyB - Second connected body. - * @param restAngle - The relative angle of bodies at which the spring is at rest. If not given, it's set to the current relative angle between the bodies. - * @param stiffness - Stiffness of the spring. A number >= 0. - Default: 100 - * @param damping - Damping of the spring. A number >= 0. - Default: 1 + * @param world A reference to the P2 World. + * @param bodyA First connected body. + * @param bodyB Second connected body. + * @param restAngle The relative angle of bodies at which the spring is at rest. If not given, it's set to the current relative angle between the bodies. + * @param stiffness Stiffness of the spring. A number >= 0. - Default: 100 + * @param damping Damping of the spring. A number >= 0. - Default: 1 */ constructor(bodyA: Body, bodyB: Body, options?: { restAngle?: number; diff --git a/typescript/pixi.comments.d.ts b/typescript/pixi.comments.d.ts index 51092dd05..58226c947 100644 --- a/typescript/pixi.comments.d.ts +++ b/typescript/pixi.comments.d.ts @@ -187,8 +187,8 @@ declare module PIXI { * This is the base class for creating a PIXI filter. Currently only webGL supports filters. * If you want to make a custom filter this should be your base class. * - * @param fragmentSrc - The fragment source in an array of strings. - * @param uniforms - An object containing the uniforms for this filter. + * @param fragmentSrc The fragment source in an array of strings. + * @param uniforms An object containing the uniforms for this filter. */ constructor(fragmentSrc: string[], uniforms: any); @@ -220,7 +220,7 @@ declare module PIXI { * You can use this filter to apply all manor of crazy warping effects * Currently the r property of the texture is used to offset the x and the g property of the texture is used to offset the y. * - * @param texture - The texture used for the displacement map * must be power of 2 texture at the moment + * @param texture The texture used for the displacement map * must be power of 2 texture at the moment */ constructor(texture: Texture); @@ -286,11 +286,11 @@ declare module PIXI { * When all items have been loaded this class will dispatch a 'onLoaded' event * As each individual item is loaded this class will dispatch a 'onProgress' event * - * @param assetURLs - An array of image/sprite sheet urls that you would like loaded - supported. Supported image formats include 'jpeg', 'jpg', 'png', 'gif'. Supported - sprite sheet data formats only include 'JSON' at this time. Supported bitmap font - data formats include 'xml' and 'fnt'. - * @param crossorigin - Whether requests should be treated as crossorigin + * @param assetURLs An array of image/sprite sheet urls that you would like loaded + * supported. Supported image formats include 'jpeg', 'jpg', 'png', 'gif'. Supported + * sprite sheet data formats only include 'JSON' at this time. Supported bitmap font + * data formats include 'xml' and 'fnt'. + * @param crossorigin Whether requests should be treated as crossorigin */ constructor(assetURLs: string[], crossorigin: boolean); @@ -337,8 +337,8 @@ declare module PIXI { * It is highly recommended to use texture atlases (also know as 'sprite sheets') as it allowed sprites to be batched and drawn together for highly increased rendering speed. * Once the data has been loaded the frames are stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrameId() and PIXI.Sprite.fromFrameId() * - * @param url - The url of the JSON file - * @param crossorigin - Whether requests should be treated as crossorigin + * @param url The url of the JSON file + * @param crossorigin Whether requests should be treated as crossorigin */ constructor(url: string, crossorigin: boolean); @@ -370,19 +370,19 @@ declare module PIXI { * Helper function that creates a base texture from the given image url. * If the image is not in the base texture cache it will be created and loaded. * - * @param imageUrl - The image url of the texture - * @param crossorigin - - - * @param scaleMode - See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values - * @return - BaseTexture + * @param imageUrl The image url of the texture + * @param crossorigin - + * @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values + * @return BaseTexture */ static fromImage(imageUrl: string, crossorigin?: boolean, scaleMode?: scaleModes): BaseTexture; /** * Helper function that creates a base texture from the given canvas element. * - * @param canvas - The canvas element source of the texture - * @param scaleMode - See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values - * @return - BaseTexture + * @param canvas The canvas element source of the texture + * @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values + * @return BaseTexture */ static fromCanvas(canvas: HTMLCanvasElement, scaleMode?: scaleModes): BaseTexture; @@ -390,16 +390,16 @@ declare module PIXI { /** * A texture stores the information that represents an image. All textures have a base texture. * - * @param source - the source object (image or canvas) - * @param scaleMode - See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values + * @param source the source object (image or canvas) + * @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values */ constructor(source: HTMLImageElement, scaleMode: scaleModes); /** * A texture stores the information that represents an image. All textures have a base texture. * - * @param source - the source object (image or canvas) - * @param scaleMode - See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values + * @param source the source object (image or canvas) + * @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values */ constructor(source: HTMLCanvasElement, scaleMode: scaleModes); @@ -470,7 +470,7 @@ declare module PIXI { /** * Changes the source image of the texture * - * @param newSrc - the path of the image + * @param newSrc the path of the image */ updateSourceImage(newSrc: string): void; @@ -498,8 +498,8 @@ declare module PIXI { * This loader will also load the image file as the data. * When loaded this class will dispatch a 'loaded' event * - * @param url - The url of the sprite sheet JSON file - * @param crossorigin - Whether requests should be treated as crossorigin + * @param url The url of the sprite sheet JSON file + * @param crossorigin Whether requests should be treated as crossorigin */ constructor(url: string, crossorigin: boolean); @@ -559,8 +559,8 @@ declare module PIXI { * http://www.angelcode.com/products/bmfont/ for windows or * http://www.bmglyph.com/ for mac. * - * @param text - The copy that you would like the text to display - * @param style - The style parameters + * @param text The copy that you would like the text to display + * @param style The style parameters */ constructor(text: string, style: BitmapTextStyle); @@ -590,7 +590,7 @@ declare module PIXI { /** * Set the text string to be rendered. * - * @param text - The text that you would like displayed + * @param text The text that you would like displayed */ setText(text: string): void; @@ -599,7 +599,7 @@ declare module PIXI { * style.font {String} The size (optional) and bitmap font id (required) eq 'Arial' or '20px Arial' (must have loaded previously) * [style.align='left'] {String} Alignment for multiline text ('left', 'center' or 'right'), does not affect single lines of text * - * @param style - The style parameters, contained as properties of an object + * @param style The style parameters, contained as properties of an object */ setStyle(style: BitmapTextStyle): void; @@ -673,8 +673,8 @@ declare module PIXI { /** * Creates a Canvas element of the given size. * - * @param width - the width for the newly created canvas - * @param height - the height for the newly created canvas + * @param width the width for the newly created canvas + * @param height the height for the newly created canvas */ constructor(width: number, height: number); @@ -708,8 +708,8 @@ declare module PIXI { /** * Resizes the canvas to the specified width and height. * - * @param width - the new width of the canvas - * @param height - the new height of the canvas + * @param width the new width of the canvas + * @param height the new height of the canvas */ resize(width: number, height: number): void; @@ -725,15 +725,15 @@ declare module PIXI { /** * This method adds it to the current stack of masks. * - * @param maskData - the maskData that will be pushed - * @param renderSession - The renderSession whose context will be used for this mask manager. + * @param maskData the maskData that will be pushed + * @param renderSession The renderSession whose context will be used for this mask manager. */ pushMask(maskData: MaskData, renderSession: RenderSession): void; /** * Restores the current drawing context to the state it was before the mask was applied. * - * @param renderSession - The renderSession whose context will be used for this mask manager. + * @param renderSession The renderSession whose context will be used for this mask manager. */ popMask(renderSession: RenderSession): void; @@ -751,9 +751,9 @@ declare module PIXI { * The CanvasRenderer draws the Stage and all its content onto a 2d canvas. This renderer should be used for browsers that do not support webGL. * Don't forget to add the CanvasRenderer.view to your DOM or you will not see anything :) * - * @param width - the width of the canvas view - Default: 800 - * @param height - the height of the canvas view - Default: 600 - * @param options - The optional renderer parameters + * @param width the width of the canvas view - Default: 800 + * @param height the height of the canvas view - Default: 600 + * @param options The optional renderer parameters */ constructor(width?: number, height?: number, options?: PixiRendererOptions); @@ -828,22 +828,22 @@ declare module PIXI { /** * Removes everything from the renderer and optionally removes the Canvas DOM element. * - * @param removeView - Removes the Canvas element from the DOM. - Default: true + * @param removeView Removes the Canvas element from the DOM. - Default: true */ destroy(removeView?: boolean): void; /** * Renders the Stage to this canvas view * - * @param stage - the Stage element to be rendered + * @param stage the Stage element to be rendered */ render(stage: Stage): void; /** * Resizes the canvas view to the specified width and height * - * @param width - the new width of the canvas view - * @param height - the new height of the canvas view + * @param width the new width of the canvas view + * @param height the new height of the canvas view */ resize(width: number, height: number): void; @@ -859,27 +859,27 @@ declare module PIXI { /** * Basically this method just needs a sprite and a color and tints the sprite with the given color. * - * @param sprite - the sprite to tint - * @param color - the color to use to tint the sprite with - * @return - The tinted canvas + * @param sprite the sprite to tint + * @param color the color to use to tint the sprite with + * @return The tinted canvas */ static getTintedTexture(sprite: Sprite, color: number): HTMLCanvasElement; /** * Tint a texture using the "multiply" operation. * - * @param texture - the texture to tint - * @param color - the color to use to tint the sprite with - * @param canvas - the current canvas + * @param texture the texture to tint + * @param color the color to use to tint the sprite with + * @param canvas the current canvas */ static tintWithMultiply(texture: Texture, color: number, canvas: HTMLCanvasElement): void; /** * Tint a texture using the "overlay" operation. * - * @param texture - the texture to tint - * @param color - the color to use to tint the sprite with - * @param canvas - the current canvas + * @param texture the texture to tint + * @param color the color to use to tint the sprite with + * @param canvas the current canvas */ static tintWithOverlay(texture: Texture, color: number, canvas: HTMLCanvasElement): void; static tintWithPerPixel(texture: Texture, color: number, canvas: HTMLCanvasElement): void; @@ -887,7 +887,7 @@ declare module PIXI { /** * Rounds the specified color according to the PIXI.CanvasTinter.cacheStepsPerColorChannel. * - * @param color - the color to round, should be a hex color + * @param color the color to round, should be a hex color */ static roundColor(color: number): void; @@ -920,9 +920,9 @@ declare module PIXI { /** * The Circle object can be used to specify a hit area for displayObjects * - * @param x - The X coordinate of the center of this circle - * @param y - The Y coordinate of the center of this circle - * @param radius - The radius of the circle + * @param x The X coordinate of the center of this circle + * @param y The Y coordinate of the center of this circle + * @param radius The radius of the circle */ constructor(x: number, y: number, radius: number); @@ -948,22 +948,22 @@ declare module PIXI { /** * Creates a clone of this Circle instance - * @return - a copy of the Circle + * @return a copy of the Circle */ clone(): Circle; /** * Checks whether the x and y coordinates given are contained within this circle * - * @param x - The X coordinate of the point to test - * @param y - The Y coordinate of the point to test - * @return - Whether the x/y coordinates are within this Circle + * @param x The X coordinate of the point to test + * @param y The Y coordinate of the point to test + * @return Whether the x/y coordinates are within this Circle */ contains(x: number, y: number): boolean; /** * Returns the framing rectangle of the circle as a PIXI.Rectangle object - * @return - the framing rectangle + * @return the framing rectangle */ getBounds(): Rectangle; @@ -1016,9 +1016,9 @@ declare module PIXI { * A wide variety of image effects can be achieved through convolutions, including blurring, edge detection, sharpening, embossing, and beveling. * The matrix should be specified as a 9 point Array. See http://docs.gimp.org/en/plug-in-convmatrix.html for more info. * - * @param matrix - An array of values used for matrix transformation. Specified as a 9 point Array. - * @param width - Width of the object you are transforming - * @param height - Height of the object you are transforming + * @param matrix An array of values used for matrix transformation. Specified as a 9 point Array. + * @param width Width of the object you are transforming + * @param height Height of the object you are transforming */ constructor(matrix: number[], width: number, height: number); @@ -1069,7 +1069,7 @@ declare module PIXI { * You can use this filter to apply all manor of crazy warping effects * Currently the r property of the texture is used offset the x and the g property of the texture is used to offset the y. * - * @param texture - The texture used for the displacement map * must be power of 2 texture at the moment + * @param texture The texture used for the displacement map * must be power of 2 texture at the moment */ constructor(texture: Texture); @@ -1236,7 +1236,7 @@ declare module PIXI { /** * A callback that is used when the users clicks on the displayObject with their mouse's left button * - * @param interactionData - - + * @param interactionData - */ click(e: InteractionData): void; displayObjectUpdateTransform(): void; @@ -1244,14 +1244,14 @@ declare module PIXI { /** * Retrieves the bounds of the displayObject as a rectangle object * - * @param matrix - - - * @return - the rectangular bounding area + * @param matrix - + * @return the rectangular bounding area */ getBounds(matrix?: Matrix): Rectangle; /** * Retrieves the local bounds of the displayObject as a rectangle object - * @return - the rectangular bounding area + * @return the rectangular bounding area */ getLocalBounds(): Rectangle; @@ -1259,31 +1259,31 @@ declare module PIXI { * Useful function that returns a texture of the displayObject object that can then be used to create sprites * This can be quite useful if your displayObject is static / complicated and needs to be reused multiple times. * - * @param resolution - The resolution of the texture being generated - * @param scaleMode - See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values - * @param renderer - The renderer used to generate the texture. - * @return - a texture of the graphics object + * @param resolution The resolution of the texture being generated + * @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values + * @param renderer The renderer used to generate the texture. + * @return a texture of the graphics object */ generateTexture(resolution: number, scaleMode: scaleModes, renderer: PixiRenderer): RenderTexture; /** * A callback that is used when the user clicks the mouse's left button down over the sprite * - * @param interactionData - - + * @param interactionData - */ mousedown(e: InteractionData): void; /** * A callback that is used when the users mouse leaves the displayObject * - * @param interactionData - - + * @param interactionData - */ mouseout(e: InteractionData): void; /** * A callback that is used when the users mouse rolls over the displayObject * - * @param interactionData - - + * @param interactionData - */ mouseover(e: InteractionData): void; @@ -1291,7 +1291,7 @@ declare module PIXI { * A callback that is used when the user releases the mouse's left button that was over the displayObject * for this callback to be fired, the mouse's left button must have been pressed down over the displayObject * - * @param interactionData - - + * @param interactionData - */ mouseup(e: InteractionData): void; mousemove(e: InteractionData): void; @@ -1300,21 +1300,21 @@ declare module PIXI { * A callback that is used when the user releases the mouse's left button that was over the displayObject but is no longer over the displayObject * for this callback to be fired, the mouse's left button must have been pressed down over the displayObject * - * @param interactionData - - + * @param interactionData - */ mouseupoutside(e: InteractionData): void; /** * A callback that is used when the users clicks on the displayObject with their mouse's right button * - * @param interactionData - - + * @param interactionData - */ rightclick(e: InteractionData): void; /** * A callback that is used when the user clicks the mouse's right button down over the sprite * - * @param interactionData - - + * @param interactionData - */ rightdown(e: InteractionData): void; @@ -1322,7 +1322,7 @@ declare module PIXI { * A callback that is used when the user releases the mouse's right button that was over the displayObject * for this callback to be fired the mouse's right button must have been pressed down over the displayObject * - * @param interactionData - - + * @param interactionData - */ rightup(e: InteractionData): void; @@ -1330,14 +1330,14 @@ declare module PIXI { * A callback that is used when the user releases the mouse's right button that was over the displayObject but is no longer over the displayObject * for this callback to be fired, the mouse's right button must have been pressed down over the displayObject * - * @param interactionData - - + * @param interactionData - */ rightupoutside(e: InteractionData): void; /** * Sets the object's stage reference, the stage this object is connected to * - * @param stage - the stage that the object will have as its current stage reference + * @param stage the stage that the object will have as its current stage reference */ setStageReference(stage: Stage): void; @@ -1345,31 +1345,31 @@ declare module PIXI { * A callback that is used when the users taps on the sprite with their finger * basically a touch version of click * - * @param interactionData - - + * @param interactionData - */ tap(e: InteractionData): void; /** * Calculates the global position of the display object * - * @param position - The world origin to calculate from - * @return - A point object representing the position of this object + * @param position The world origin to calculate from + * @return A point object representing the position of this object */ toGlobal(position: Point): Point; /** * Calculates the local position of the display object relative to another point * - * @param position - The world origin to calculate from - * @param from - The DisplayObject to calculate the global position from - * @return - A point object representing the position of this object + * @param position The world origin to calculate from + * @param from The DisplayObject to calculate the global position from + * @return A point object representing the position of this object */ toLocal(position: Point, from: DisplayObject): Point; /** * A callback that is used when the user releases a touch over the displayObject * - * @param interactionData - - + * @param interactionData - */ touchend(e: InteractionData): void; @@ -1377,14 +1377,14 @@ declare module PIXI { * A callback that is used when the user releases the touch that was over the displayObject * for this callback to be fired, The touch must have started over the sprite * - * @param interactionData - - + * @param interactionData - */ touchendoutside(e: InteractionData): void; /** * A callback that is used when the user touches over the displayObject * - * @param interactionData - - + * @param interactionData - */ touchstart(e: InteractionData): void; touchmove(e: InteractionData): void; @@ -1426,69 +1426,69 @@ declare module PIXI { /** * Adds a child to the container. * - * @param child - The DisplayObject to add to the container - * @return - The child that was added. + * @param child The DisplayObject to add to the container + * @return The child that was added. */ addChild(child: DisplayObject): DisplayObject; /** * Adds a child to the container at a specified index. If the index is out of bounds an error will be thrown * - * @param child - The child to add - * @param index - The index to place the child in - * @return - The child that was added. + * @param child The child to add + * @param index The index to place the child in + * @return The child that was added. */ addChildAt(child: DisplayObject, index: number): DisplayObject; /** * Retrieves the bounds of the displayObjectContainer as a rectangle. The bounds calculation takes all visible children into consideration. - * @return - The rectangular bounding area + * @return The rectangular bounding area */ getBounds(): Rectangle; /** * Returns the child at the specified index * - * @param index - The index to get the child from - * @return - The child at the given index, if any. + * @param index The index to get the child from + * @return The child at the given index, if any. */ getChildAt(index: number): DisplayObject; /** * Returns the index position of a child DisplayObject instance * - * @param child - The DisplayObject instance to identify - * @return - The index position of the child display object to identify + * @param child The DisplayObject instance to identify + * @return The index position of the child display object to identify */ getChildIndex(child: DisplayObject): number; /** * Retrieves the non-global local bounds of the displayObjectContainer as a rectangle. The calculation takes all visible children into consideration. - * @return - The rectangular bounding area + * @return The rectangular bounding area */ getLocalBounds(): Rectangle; /** * Removes a child from the container. * - * @param child - The DisplayObject to remove - * @return - The child that was removed. + * @param child The DisplayObject to remove + * @return The child that was removed. */ removeChild(child: DisplayObject): DisplayObject; /** * Removes a child from the specified index position. * - * @param index - The index to get the child from - * @return - The child that was removed. + * @param index The index to get the child from + * @return The child that was removed. */ removeChildAt(index: number): DisplayObject; /** * Removes all children from this container that are within the begin and end indexes. * - * @param beginIndex - The beginning position. Default value is 0. - * @param endIndex - The ending position. Default value is size of the container. + * @param beginIndex The beginning position. Default value is 0. + * @param endIndex The ending position. Default value is size of the container. */ removeChildren(beginIndex?: number, endIndex?: number): DisplayObject[]; @@ -1500,16 +1500,16 @@ declare module PIXI { /** * Changes the position of an existing child in the display object container * - * @param child - The child DisplayObject instance for which you want to change the index number - * @param index - The resulting index number for the child display object + * @param child The child DisplayObject instance for which you want to change the index number + * @param index The resulting index number for the child display object */ setChildIndex(child: DisplayObject, index: number): void; /** * Swaps the position of 2 Display Objects within this container. * - * @param child - - - * @param child2 - - + * @param child - + * @param child2 - */ swapChildren(child: DisplayObject, child2: DisplayObject): void; @@ -1525,10 +1525,10 @@ declare module PIXI { /** * The Ellipse object can be used to specify a hit area for displayObjects * - * @param x - The X coordinate of the center of the ellipse - * @param y - The Y coordinate of the center of the ellipse - * @param width - The half width of this ellipse - * @param height - The half height of this ellipse + * @param x The X coordinate of the center of the ellipse + * @param y The Y coordinate of the center of the ellipse + * @param width The half width of this ellipse + * @param height The half height of this ellipse */ constructor(x: number, y: number, width: number, height: number); @@ -1560,22 +1560,22 @@ declare module PIXI { /** * Creates a clone of this Ellipse instance - * @return - a copy of the ellipse + * @return a copy of the ellipse */ clone(): Ellipse; /** * Checks whether the x and y coordinates given are contained within this ellipse * - * @param x - The X coordinate of the point to test - * @param y - The Y coordinate of the point to test - * @return - Whether the x/y coords are within this ellipse + * @param x The X coordinate of the point to test + * @param y The Y coordinate of the point to test + * @return Whether the x/y coords are within this ellipse */ contains(x: number, y: number): boolean; /** * Returns the framing rectangle of the ellipse as a PIXI.Rectangle object - * @return - the framing rectangle + * @return the framing rectangle */ getBounds(): Rectangle; @@ -1591,9 +1591,9 @@ declare module PIXI { /** * Creates an homogenous object for tracking events so users can know what to expect. * - * @param target - The target object that the event is called on - * @param name - The string name of the event that was triggered - * @param data - Arbitrary event data to pass along + * @param target The target object that the event is called on + * @param name The string name of the event that was triggered + * @param data Arbitrary event data to pass along */ constructor(target: any, name: string, data: any); @@ -1642,7 +1642,7 @@ declare module PIXI { /** * Mixes in the properties of the EventTarget prototype onto another object * - * @param object - The obj to mix into + * @param object The obj to mix into */ static mixin(obj: any): void; @@ -1654,10 +1654,10 @@ declare module PIXI { /** * * - * @param gl - the current WebGL drawing context - * @param width - the horizontal range of the filter - * @param height - the vertical range of the filter - * @param scaleMode - See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values + * @param gl the current WebGL drawing context + * @param width the horizontal range of the filter + * @param height the vertical range of the filter + * @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values */ constructor(gl: WebGLRenderingContext, width: number, height: number, scaleMode: scaleModes); @@ -1677,8 +1677,8 @@ declare module PIXI { /** * Resizes the texture to the specified width and height * - * @param width - the new width of the texture - * @param height - the new height of the texture + * @param width the new width of the texture + * @param height the new height of the texture */ resize(width: number, height: number): void; @@ -1772,13 +1772,13 @@ declare module PIXI { /** * The arc method creates an arc/curve (used to create circles, or parts of circles). * - * @param cx - The x-coordinate of the center of the circle - * @param cy - The y-coordinate of the center of the circle - * @param radius - The radius of the circle - * @param startAngle - The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle) - * @param endAngle - The ending angle, in radians - * @param anticlockwise - Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise. - * @return - + * @param cx The x-coordinate of the center of the circle + * @param cy The y-coordinate of the center of the circle + * @param radius The radius of the circle + * @param startAngle The starting angle, in radians (0 is at the 3 o'clock position of the arc's circle) + * @param endAngle The ending angle, in radians + * @param anticlockwise Optional. Specifies whether the drawing should be counterclockwise or clockwise. False is default, and indicates clockwise, while true indicates counter-clockwise. + * @return */ arc(cx: number, cy: number, radius: number, startAngle: number, endAngle: number, anticlockwise: boolean): Graphics; arcTo(x1: number, y1: number, x2: number, y2: number, radius: number): Graphics; @@ -1787,28 +1787,28 @@ declare module PIXI { * Specifies a simple one-color fill that subsequent calls to other Graphics methods * (such as lineTo() or drawCircle()) use when drawing. * - * @param color - the color of the fill - * @param alpha - the alpha of the fill - * @return - + * @param color the color of the fill + * @param alpha the alpha of the fill + * @return */ beginFill(color?: number, alpha?: number): Graphics; /** * Calculate the points for a bezier curve and then draws it. * - * @param cpX - Control point x - * @param cpY - Control point y - * @param cpX2 - Second Control point x - * @param cpY2 - Second Control point y - * @param toX - Destination point x - * @param toY - Destination point y - * @return - + * @param cpX Control point x + * @param cpY Control point y + * @param cpX2 Second Control point x + * @param cpY2 Second Control point y + * @param toX Destination point x + * @param toY Destination point y + * @return */ bezierCurveTo(cpX: number, cpY: number, cpX2: number, cpY2: number, toX: number, toY: number): Graphics; /** * Clears the graphics that were drawn to this Graphics object, and resets fill and line style settings. - * @return - + * @return */ clear(): Graphics; @@ -1820,99 +1820,99 @@ declare module PIXI { /** * Draws a circle. * - * @param x - The X coordinate of the center of the circle - * @param y - The Y coordinate of the center of the circle - * @param radius - The radius of the circle - * @return - + * @param x The X coordinate of the center of the circle + * @param y The Y coordinate of the center of the circle + * @param radius The radius of the circle + * @return */ drawCircle(x: number, y: number, radius: number): Graphics; /** * Draws an ellipse. * - * @param x - The X coordinate of the center of the ellipse - * @param y - The Y coordinate of the center of the ellipse - * @param width - The half width of the ellipse - * @param height - The half height of the ellipse - * @return - + * @param x The X coordinate of the center of the ellipse + * @param y The Y coordinate of the center of the ellipse + * @param width The half width of the ellipse + * @param height The half height of the ellipse + * @return */ drawEllipse(x: number, y: number, width: number, height: number): Graphics; /** * Draws a polygon using the given path. * - * @param path - The path data used to construct the polygon. - * @return - + * @param path The path data used to construct the polygon. + * @return */ drawPolygon(path: any): Graphics; /** * * - * @param x - The X coord of the top-left of the rectangle - * @param y - The Y coord of the top-left of the rectangle - * @param width - The width of the rectangle - * @param height - The height of the rectangle - * @return - + * @param x The X coord of the top-left of the rectangle + * @param y The Y coord of the top-left of the rectangle + * @param width The width of the rectangle + * @param height The height of the rectangle + * @return */ drawRect(x: number, y: number, width: number, height: number): Graphics; /** * * - * @param x - The X coord of the top-left of the rectangle - * @param y - The Y coord of the top-left of the rectangle - * @param width - The width of the rectangle - * @param height - The height of the rectangle - * @param radius - Radius of the rectangle corners + * @param x The X coord of the top-left of the rectangle + * @param y The Y coord of the top-left of the rectangle + * @param width The width of the rectangle + * @param height The height of the rectangle + * @param radius Radius of the rectangle corners */ drawRoundedRect(x: number, y: number, width: number, height: number, radius: number): Graphics; /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape - The Shape object to draw. - * @return - The generated GraphicsData object. + * @param shape The Shape object to draw. + * @return The generated GraphicsData object. */ drawShape(shape: Circle): GraphicsData; /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape - The Shape object to draw. - * @return - The generated GraphicsData object. + * @param shape The Shape object to draw. + * @return The generated GraphicsData object. */ drawShape(shape: Rectangle): GraphicsData; /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape - The Shape object to draw. - * @return - The generated GraphicsData object. + * @param shape The Shape object to draw. + * @return The generated GraphicsData object. */ drawShape(shape: Ellipse): GraphicsData; /** * Draws the given shape to this Graphics object. Can be any of Circle, Rectangle, Ellipse, Line or Polygon. * - * @param shape - The Shape object to draw. - * @return - The generated GraphicsData object. + * @param shape The Shape object to draw. + * @return The generated GraphicsData object. */ drawShape(shape: Polygon): GraphicsData; /** * Applies a fill to the lines and shapes that were added since the last call to the beginFill() method. - * @return - + * @return */ endFill(): Graphics; /** * Specifies the line style used for subsequent calls to Graphics methods such as the lineTo() method or the drawCircle() method. * - * @param lineWidth - width of the line to draw, will update the objects stored style - * @param color - color of the line to draw, will update the objects stored style - * @param alpha - alpha of the line to draw, will update the objects stored style - * @return - + * @param lineWidth width of the line to draw, will update the objects stored style + * @param color color of the line to draw, will update the objects stored style + * @param alpha alpha of the line to draw, will update the objects stored style + * @return */ lineStyle(lineWidth?: number, color?: number, alpha?: number): Graphics; @@ -1920,18 +1920,18 @@ declare module PIXI { * Draws a line using the current line style from the current drawing position to (x, y); * The current drawing position is then set to (x, y). * - * @param x - the X coordinate to draw to - * @param y - the Y coordinate to draw to - * @return - + * @param x the X coordinate to draw to + * @param y the Y coordinate to draw to + * @return */ lineTo(x: number, y: number): Graphics; /** * Moves the current drawing position to x, y. * - * @param x - the X coordinate to move to - * @param y - the Y coordinate to move to - * @return - + * @param x the X coordinate to move to + * @param y the Y coordinate to move to + * @return */ moveTo(x: number, y: number): Graphics; @@ -1939,11 +1939,11 @@ declare module PIXI { * Calculate the points for a quadratic bezier curve and then draws it. * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c * - * @param cpX - Control point x - * @param cpY - Control point y - * @param toX - Destination point x - * @param toY - Destination point y - * @return - + * @param cpX Control point x + * @param cpY Control point y + * @param toX Destination point x + * @param toY Destination point y + * @return */ quadraticCurveTo(cpX: number, cpY: number, toX: number, toY: number): Graphics; @@ -1977,8 +1977,8 @@ declare module PIXI { * Once the image has been loaded it is stored in the PIXI texture cache and can be accessed though PIXI.Texture.fromFrame() and PIXI.Sprite.fromFrame() * When loaded this class will dispatch a 'loaded' event * - * @param url - The url of the image - * @param crossorigin - Whether requests should be treated as crossorigin + * @param url The url of the image + * @param crossorigin Whether requests should be treated as crossorigin */ constructor(url: string, crossorigin?: boolean); @@ -2006,9 +2006,9 @@ declare module PIXI { /** * Loads image and split it to uniform sized frames * - * @param frameWidth - width of each frame - * @param frameHeight - height of each frame - * @param textureName - if given, the frames will be cached in - format + * @param frameWidth width of each frame + * @param frameHeight height of each frame + * @param textureName if given, the frames will be cached in - format */ loadFramedSpriteSheet(frameWidth: number, frameHeight: number, textureName: string): void; @@ -2040,9 +2040,9 @@ declare module PIXI { /** * This will return the local coordinates of the specified displayObject for this InteractionData * - * @param displayObject - The DisplayObject that you would like the local coords off - * @param point - A Point object in which to store the value, optional (otherwise will create a new point) - * @return - A point containing the coordinates of the InteractionData position relative to the DisplayObject + * @param displayObject The DisplayObject that you would like the local coords off + * @param point A Point object in which to store the value, optional (otherwise will create a new point) + * @return A point containing the coordinates of the InteractionData position relative to the DisplayObject */ getLocalPosition(displayObject: DisplayObject): Point; @@ -2103,7 +2103,7 @@ declare module PIXI { * if its interactive parameter is set to true * This manager also supports multitouch. * - * @param stage - The stage to handle interactions + * @param stage The stage to handle interactions */ constructor(stage: Stage); } @@ -2136,8 +2136,8 @@ declare module PIXI { * When loaded this class will dispatch a 'loaded' event * If loading fails this class will dispatch an 'error' event * - * @param url - The url of the JSON file - * @param crossorigin - Whether requests should be treated as crossorigin + * @param url The url of the JSON file + * @param crossorigin Whether requests should be treated as crossorigin */ constructor(url: string, crossorigin?: boolean); @@ -2230,8 +2230,8 @@ declare module PIXI { /** * Appends the given Matrix to this Matrix. * - * @param matrix - - - * @return - This matrix. Good for chaining method calls. + * @param matrix - + * @return This matrix. Good for chaining method calls. */ append(matrix: Matrix): Matrix; @@ -2239,9 +2239,9 @@ declare module PIXI { * Get a new position with the current transformation applied. * Can be used to go from a child's coordinate space to the world coordinate space. (e.g. rendering) * - * @param pos - The origin - * @param newPos - The point that the new position is assigned to (allowed to be same as input) - * @return - The new point, transformed through this matrix + * @param pos The origin + * @param newPos The point that the new position is assigned to (allowed to be same as input) + * @return The new point, transformed through this matrix */ apply(pos: Point, newPos: Point): Point; @@ -2249,24 +2249,24 @@ declare module PIXI { * Get a new position with the inverse of the current transformation applied. * Can be used to go from the world coordinate space to a child's coordinate space. (e.g. input) * - * @param pos - The origin - * @param newPos - The point that the new position is assigned to (allowed to be same as input) - * @return - The new point, inverse-transformed through this matrix + * @param pos The origin + * @param newPos The point that the new position is assigned to (allowed to be same as input) + * @return The new point, inverse-transformed through this matrix */ applyInverse(pos: Point, newPos: Point): Point; determineMatrixArrayType(): number[]; /** * Resets this Matix to an identity (default) matrix. - * @return - This matrix. Good for chaining method calls. + * @return This matrix. Good for chaining method calls. */ identity(): Matrix; /** * Applies a rotation transformation to the matrix. * - * @param angle - The angle in radians. - * @return - This matrix. Good for chaining method calls. + * @param angle The angle in radians. + * @return This matrix. Good for chaining method calls. */ rotate(angle: number): Matrix; @@ -2280,33 +2280,33 @@ declare module PIXI { * tx = array[2] * ty = array[5] * - * @param array - The array that the matrix will be populated from. + * @param array The array that the matrix will be populated from. */ fromArray(array: number[]): void; /** * Translates the matrix on the x and y. * - * @param x - - - * @param y - - - * @return - This matrix. Good for chaining method calls. + * @param x - + * @param y - + * @return This matrix. Good for chaining method calls. */ translate(x: number, y: number): Matrix; /** * Creates an array from the current Matrix object. * - * @param transpose - Whether we need to transpose the matrix or not - * @return - the newly created array which contains the matrix + * @param transpose Whether we need to transpose the matrix or not + * @return the newly created array which contains the matrix */ toArray(transpose: boolean): number[]; /** * Applies a scale transformation to the matrix. * - * @param x - The amount to scale horizontally - * @param y - The amount to scale vertically - * @return - This matrix. Good for chaining method calls. + * @param x The amount to scale horizontally + * @param y The amount to scale vertically + * @return This matrix. Good for chaining method calls. */ scale(x: number, y: number): Matrix; @@ -2335,14 +2335,14 @@ declare module PIXI { /** * A short hand way of creating a movieclip from an array of frame ids * - * @param frames - the array of frames ids the movieclip will use as its texture frames + * @param frames the array of frames ids the movieclip will use as its texture frames */ static fromFrames(frames: string[]): MovieClip; /** * A short hand way of creating a movieclip from an array of image ids * - * @param frames - the array of image ids the movieclip will use as its texture frames + * @param frames the array of image ids the movieclip will use as its texture frames */ static fromImages(images: HTMLImageElement[]): HTMLImageElement; @@ -2350,7 +2350,7 @@ declare module PIXI { /** * A MovieClip is a simple way to display an animation depicted by a list of textures. * - * @param textures - an array of {Texture} objects that make up the animation + * @param textures an array of {Texture} objects that make up the animation */ constructor(textures: Texture[]); @@ -2394,14 +2394,14 @@ declare module PIXI { /** * Goes to a specific frame and begins playing the MovieClip * - * @param frameNumber - frame index to start at + * @param frameNumber frame index to start at */ gotoAndPlay(frameNumber: number): void; /** * Stops the MovieClip and goes to a specific frame * - * @param frameNumber - frame index to stop at + * @param frameNumber frame index to stop at */ gotoAndStop(frameNumber: number): void; onComplete(): void; @@ -2490,7 +2490,7 @@ declare module PIXI { /** * * - * @param gl - the current WebGL drawing context + * @param gl the current WebGL drawing context */ constructor(gl: WebGLRenderingContext); @@ -2570,7 +2570,7 @@ declare module PIXI { /** * * - * @param gl - the current WebGL drawing context + * @param gl the current WebGL drawing context */ constructor(gl: WebGLRenderingContext); @@ -2615,7 +2615,7 @@ declare module PIXI { /** * * - * @param gl - the current WebGL drawing context + * @param gl the current WebGL drawing context */ constructor(gl: WebGLRenderingContext); @@ -2654,7 +2654,7 @@ declare module PIXI { /** * * - * @param gl - the current WebGL drawing context + * @param gl the current WebGL drawing context */ constructor(gl: WebGLRenderingContext); @@ -2693,7 +2693,7 @@ declare module PIXI { /** * * - * @param gl - the current WebGL drawing context + * @param gl the current WebGL drawing context */ constructor(gl: WebGLRenderingContext); @@ -2736,8 +2736,8 @@ declare module PIXI { /** * The Point object represents a location in a two-dimensional coordinate system, where x represents the horizontal axis and y represents the vertical axis. * - * @param x - position of the point on the x axis - * @param y - position of the point on the y axis + * @param x position of the point on the x axis + * @param y position of the point on the y axis */ constructor(x?: number, y?: number); @@ -2757,7 +2757,7 @@ declare module PIXI { /** * Creates a clone of this point - * @return - a copy of the point + * @return a copy of the point */ clone(): Point; @@ -2765,8 +2765,8 @@ declare module PIXI { * Sets the point to a new x and y position. * If y is omitted, both x and y will be set to x. * - * @param x - position of the point on the x axis - Default: 0 - * @param y - position of the point on the y axis - Default: 0 + * @param x position of the point on the x axis - Default: 0 + * @param y position of the point on the y axis - Default: 0 */ set(x: number, y: number): void; @@ -2778,44 +2778,44 @@ declare module PIXI { /** * * - * @param points - This can be an array of Points that form the polygon, - a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be - all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the - arguments passed can be flat x,y values e.g. `new PIXI.Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are - Numbers. + * @param points This can be an array of Points that form the polygon, + * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be + * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the + * arguments passed can be flat x,y values e.g. `new PIXI.Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are + * Numbers. */ constructor(points: Point[]); /** * * - * @param points - This can be an array of Points that form the polygon, - a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be - all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the - arguments passed can be flat x,y values e.g. `new PIXI.Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are - Numbers. + * @param points This can be an array of Points that form the polygon, + * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be + * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the + * arguments passed can be flat x,y values e.g. `new PIXI.Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are + * Numbers. */ constructor(points: number[]); /** * * - * @param points - This can be an array of Points that form the polygon, - a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be - all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the - arguments passed can be flat x,y values e.g. `new PIXI.Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are - Numbers. + * @param points This can be an array of Points that form the polygon, + * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be + * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the + * arguments passed can be flat x,y values e.g. `new PIXI.Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are + * Numbers. */ constructor(...points: Point[]); /** * * - * @param points - This can be an array of Points that form the polygon, - a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be - all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the - arguments passed can be flat x,y values e.g. `new PIXI.Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are - Numbers. + * @param points This can be an array of Points that form the polygon, + * a flat array of numbers that will be interpreted as [x,y, x,y, ...], or the arguments passed can be + * all the points of the polygon e.g. `new PIXI.Polygon(new PIXI.Point(), new PIXI.Point(), ...)`, or the + * arguments passed can be flat x,y values e.g. `new PIXI.Polygon(x,y, x,y, x,y, ...)` where `x` and `y` are + * Numbers. */ constructor(...points: number[]); @@ -2828,16 +2828,16 @@ declare module PIXI { /** * Creates a clone of this polygon - * @return - a copy of the polygon + * @return a copy of the polygon */ clone(): Polygon; /** * Checks whether the x and y coordinates passed to this function are contained within this polygon * - * @param x - The X coordinate of the point to test - * @param y - The Y coordinate of the point to test - * @return - Whether the x/y coordinates are within this polygon + * @param x The X coordinate of the point to test + * @param y The Y coordinate of the point to test + * @return Whether the x/y coordinates are within this polygon */ contains(x: number, y: number): boolean; @@ -2853,10 +2853,10 @@ declare module PIXI { /** * the Rectangle object is an area defined by its position, as indicated by its top-left corner point (x, y) and by its width and its height. * - * @param x - The X coordinate of the upper-left corner of the rectangle - * @param y - The Y coordinate of the upper-left corner of the rectangle - * @param width - The overall width of this rectangle - * @param height - The overall height of this rectangle + * @param x The X coordinate of the upper-left corner of the rectangle + * @param y The Y coordinate of the upper-left corner of the rectangle + * @param width The overall width of this rectangle + * @param height The overall height of this rectangle */ constructor(x?: number, y?: number, width?: number, height?: number); @@ -2888,16 +2888,16 @@ declare module PIXI { /** * Creates a clone of this Rectangle - * @return - a copy of the rectangle + * @return a copy of the rectangle */ clone(): Rectangle; /** * Checks whether the x and y coordinates given are contained within this Rectangle * - * @param x - The X coordinate of the point to test - * @param y - The Y coordinate of the point to test - * @return - Whether the x/y coordinates are within this Rectangle + * @param x The X coordinate of the point to test + * @param y The Y coordinate of the point to test + * @return Whether the x/y coordinates are within this Rectangle */ contains(x: number, y: number): boolean; @@ -2936,8 +2936,8 @@ declare module PIXI { /** * * - * @param texture - - The texture to use on the rope. - * @param points - - An array of {PIXI.Point}. + * @param texture - The texture to use on the rope. + * @param points - An array of {PIXI.Point}. */ constructor(texture: Texture, points: Point[]); @@ -2956,11 +2956,11 @@ declare module PIXI { /** * The Rounded Rectangle object is an area defined by its position and has nice rounded corners, as indicated by its top-left corner point (x, y) and by its width and its height. * - * @param x - The X coordinate of the upper-left corner of the rounded rectangle - * @param y - The Y coordinate of the upper-left corner of the rounded rectangle - * @param width - The overall width of this rounded rectangle - * @param height - The overall height of this rounded rectangle - * @param radius - Controls the radius of the rounded corners + * @param x The X coordinate of the upper-left corner of the rounded rectangle + * @param y The Y coordinate of the upper-left corner of the rounded rectangle + * @param width The overall width of this rounded rectangle + * @param height The overall height of this rounded rectangle + * @param radius Controls the radius of the rounded corners */ constructor(x?: number, y?: number, width?: number, height?: number, radius?: number); @@ -2998,16 +2998,16 @@ declare module PIXI { /** * Creates a clone of this Rounded Rectangle - * @return - a copy of the rounded rectangle + * @return a copy of the rounded rectangle */ clone(): RoundedRectangle; /** * Checks whether the x and y coordinates given are contained within this Rounded Rectangle * - * @param x - The X coordinate of the point to test - * @param y - The Y coordinate of the point to test - * @return - Whether the x/y coordinates are within this Rounded Rectangle + * @param x The X coordinate of the point to test + * @param y The Y coordinate of the point to test + * @return Whether the x/y coordinates are within this Rounded Rectangle */ contains(x: number, y: number): boolean; @@ -3078,8 +3078,8 @@ declare module PIXI { * You will need to generate a sprite sheet to accompany the spine data * When loaded this class will dispatch a "loaded" event * - * @param url - The url of the JSON file - * @param crossorigin - Whether requests should be treated as crossorigin + * @param url The url of the JSON file + * @param crossorigin Whether requests should be treated as crossorigin */ constructor(url: string, crossOrigin: boolean); @@ -3110,8 +3110,8 @@ declare module PIXI { /** * Supporting class to load images from spine atlases as per spine spec. * - * @param basePath - Tha base path where to look for the images to be loaded - * @param crossorigin - Whether requests should be treated as crossorigin + * @param basePath Tha base path where to look for the images to be loaded + * @param crossorigin Whether requests should be treated as crossorigin */ constructor(basePath: string, crossorigin: boolean); @@ -3119,15 +3119,15 @@ declare module PIXI { /** * Starts loading a base texture as per spine specification * - * @param page - Atlas page to which texture belongs - * @param file - The file to load, this is just the file path relative to the base path configured in the constructor + * @param page Atlas page to which texture belongs + * @param file The file to load, this is just the file path relative to the base path configured in the constructor */ load(page: AtlasPage, file: string): void; /** * Unloads a previously loaded texture as per spine specification * - * @param texture - Texture object to destroy + * @param texture Texture object to destroy */ unload(texture: BaseTexture): void; @@ -3144,8 +3144,8 @@ declare module PIXI { * Helper function that creates a sprite that will contain a texture from the TextureCache based on the frameId * The frame ids are created when a Texture packer file has been loaded * - * @param frameId - The frame Id of the texture in the cache - * @return - A new Sprite using a texture from the texture cache matching the frameId + * @param frameId The frame Id of the texture in the cache + * @return A new Sprite using a texture from the texture cache matching the frameId */ static fromFrame(frameId: string): Sprite; @@ -3153,8 +3153,8 @@ declare module PIXI { * Helper function that creates a sprite that will contain a texture based on an image url * If the image is not in the texture cache it will be loaded * - * @param imageId - The image url of the texture - * @return - A new Sprite using a texture from the texture cache matching the image id + * @param imageId The image url of the texture + * @return A new Sprite using a texture from the texture cache matching the image id */ static fromImage(url: string, crossorigin?: boolean, scaleMode?: scaleModes): Sprite; @@ -3162,12 +3162,12 @@ declare module PIXI { /** * The Sprite object is the base for all textured objects that are rendered to the screen * - * @param texture - The texture for this sprite - -A sprite can be created directly from an image like this : -var sprite = new PIXI.Sprite.fromImage('assets/image.png'); -yourStage.addChild(sprite); -then obviously don't forget to add it to the stage you have already created + * @param texture The texture for this sprite + * + * A sprite can be created directly from an image like this : + * var sprite = new PIXI.Sprite.fromImage('assets/image.png'); + * yourStage.addChild(sprite); + * then obviously don't forget to add it to the stage you have already created */ constructor(texture: Texture); @@ -3207,7 +3207,7 @@ then obviously don't forget to add it to the stage you have already created /** * Sets the texture of the sprite * - * @param texture - The PIXI texture that is displayed by the sprite + * @param texture The PIXI texture that is displayed by the sprite */ setTexture(texture: Texture): void; @@ -3249,7 +3249,7 @@ then obviously don't forget to add it to the stage you have already created * } * And here you have a hundred sprites that will be renderer at the speed of light * - * @param texture - - + * @param texture - */ constructor(texture?: Texture); @@ -3282,8 +3282,8 @@ then obviously don't forget to add it to the stage you have already created * This loader will load the image file that the Spritesheet points to as well as the data. * When loaded this class will dispatch a 'loaded' event * - * @param url - The url of the sprite sheet JSON file - * @param crossorigin - Whether requests should be treated as crossorigin + * @param url The url of the sprite sheet JSON file + * @param crossorigin Whether requests should be treated as crossorigin */ constructor(url: string, crossorigin?: boolean); @@ -3340,15 +3340,15 @@ then obviously don't forget to add it to the stage you have already created /** * A Stage represents the root of the display tree. Everything connected to the stage is rendered * - * @param backgroundColor - the background color of the stage, you have to pass this in is in hex format - like: 0xFFFFFF for white - -Creating a stage is a mandatory process when you use Pixi, which is as simple as this : -var stage = new PIXI.Stage(0xFFFFFF); -where the parameter given is the background colour of the stage, in hex -you will use this stage instance to add your sprites to it and therefore to the renderer -Here is how to add a sprite to the stage : -stage.addChild(sprite); + * @param backgroundColor the background color of the stage, you have to pass this in is in hex format + * like: 0xFFFFFF for white + * + * Creating a stage is a mandatory process when you use Pixi, which is as simple as this : + * var stage = new PIXI.Stage(0xFFFFFF); + * where the parameter given is the background colour of the stage, in hex + * you will use this stage instance to add your sprites to it and therefore to the renderer + * Here is how to add a sprite to the stage : + * stage.addChild(sprite); */ constructor(backgroundColor: number); @@ -3361,15 +3361,15 @@ stage.addChild(sprite); /** * This will return the point containing global coordinates of the mouse. - * @return - A point containing the coordinates of the global InteractionData position. + * @return A point containing the coordinates of the global InteractionData position. */ getMousePosition(): Point; /** * Sets the background color for the stage * - * @param backgroundColor - the color of the background, easiest way to pass this in is in hex format - like: 0xFFFFFF for white + * @param backgroundColor the color of the background, easiest way to pass this in is in hex format + * like: 0xFFFFFF for white */ setBackgroundColor(backgroundColor: number): void; @@ -3377,7 +3377,7 @@ stage.addChild(sprite); * Sets another DOM element which can receive mouse/touch interactions instead of the default Canvas element. * This is useful for when you have other DOM elements on top of the Canvas element. * - * @param domElement - This new domElement which will receive mouse/touch events + * @param domElement This new domElement which will receive mouse/touch events */ setInteractionDelegate(domElement: HTMLElement): void; @@ -3396,9 +3396,9 @@ stage.addChild(sprite); /** * * - * @param texture - The texture to use - * @param width - the width - * @param height - the height + * @param texture The texture to use + * @param width the width + * @param height the height */ constructor(texture: Texture); @@ -3432,8 +3432,8 @@ stage.addChild(sprite); /** * Returns the bounds of the mesh as a rectangle. The bounds calculation takes the worldTransform into account. * - * @param matrix - the transformation matrix of the sprite - * @return - the framing rectangle + * @param matrix the transformation matrix of the sprite + * @return the framing rectangle */ getBounds(matrix?: Matrix): Rectangle; @@ -3451,8 +3451,8 @@ stage.addChild(sprite); * A Text Object will create a line or multiple lines of text. To split a line you can use '\n' in your text string, * or add a wordWrap property set to true and and wordWrapWidth property with a value in the style object. * - * @param text - The copy that you would like the text to display - * @param style - The style parameters + * @param text The copy that you would like the text to display + * @param style The style parameters */ constructor(text: string, style?: TextStyle); @@ -3475,32 +3475,32 @@ stage.addChild(sprite); /** * Destroys this text object. * - * @param destroyBaseTexture - whether to destroy the base texture as well + * @param destroyBaseTexture whether to destroy the base texture as well */ destroy(destroyTexture: boolean): void; /** * Set the style of the text * - * @param style - The style parameters - * @param style.fill - A canvas fillstyle that will be used on the text eg 'red', '#00FF00' - Default: 'black' - * @param style.align - Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text - Default: 'left' - * @param style.stroke - A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00' - Default: 'black' - * @param style.strokeThickness - A number that represents the thickness of the stroke. Default is 0 (no stroke) - Default: 0 - * @param style.wordWrap - Indicates if word wrap should be used - Default: false - * @param style.wordWrapWidth - The width at which text will wrap - Default: 100 - * @param style.dropShadow - Set a drop shadow for the text - Default: false - * @param style.dropShadowColor - A fill style to be used on the dropshadow e.g 'red', '#00FF00' - Default: '#000000' - * @param style.dropShadowAngle - Set a angle of the drop shadow - Default: Math.PI/4 - * @param style.dropShadowDistance - Set a distance of the drop shadow - Default: 5 - * @param style.font - The style and size of the font - Default: 'bold - 20pt Arial' + * @param style The style parameters + * @param style.fill A canvas fillstyle that will be used on the text eg 'red', '#00FF00' - Default: 'black' + * @param style.align Alignment for multiline text ('left', 'center' or 'right'), does not affect single line text - Default: 'left' + * @param style.stroke A canvas fillstyle that will be used on the text stroke eg 'blue', '#FCFF00' - Default: 'black' + * @param style.strokeThickness A number that represents the thickness of the stroke. Default is 0 (no stroke) - Default: 0 + * @param style.wordWrap Indicates if word wrap should be used - Default: false + * @param style.wordWrapWidth The width at which text will wrap - Default: 100 + * @param style.dropShadow Set a drop shadow for the text - Default: false + * @param style.dropShadowColor A fill style to be used on the dropshadow e.g 'red', '#00FF00' - Default: '#000000' + * @param style.dropShadowAngle Set a angle of the drop shadow - Default: Math.PI/4 + * @param style.dropShadowDistance Set a distance of the drop shadow - Default: 5 + * @param style.font The style and size of the font - Default: 'bold - 20pt Arial' */ setStyle(style: TextStyle): void; /** * Set the copy for the text object. To split a line you can use '\n'. * - * @param text - The copy that you would like the text to display + * @param text The copy that you would like the text to display */ setText(text: string): void; @@ -3519,9 +3519,9 @@ stage.addChild(sprite); /** * Helper function that creates a new a Texture based on the given canvas element. * - * @param canvas - The canvas element source of the texture - * @param scaleMode - See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values - * @return - Texture + * @param canvas The canvas element source of the texture + * @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values + * @return Texture */ static fromCanvas(canvas: HTMLCanvasElement, scaleMode?: scaleModes): Texture; @@ -3529,8 +3529,8 @@ stage.addChild(sprite); * Helper function that returns a Texture objected based on the given frame id. * If the frame id is not in the texture cache an error will be thrown. * - * @param frameId - The frame id of the texture - * @return - Texture + * @param frameId The frame id of the texture + * @return Texture */ static fromFrame(frameId: string): Texture; @@ -3538,26 +3538,26 @@ stage.addChild(sprite); * Helper function that creates a Texture object from the given image url. * If the image is not in the texture cache it will be created and loaded. * - * @param imageUrl - The image url of the texture - * @param crossorigin - Whether requests should be treated as crossorigin - * @param scaleMode - See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values - * @return - Texture + * @param imageUrl The image url of the texture + * @param crossorigin Whether requests should be treated as crossorigin + * @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values + * @return Texture */ static fromImage(imageUrl: string, crossorigin?: boolean, scaleMode?: scaleModes): Texture; /** * Adds a texture to the global PIXI.TextureCache. This cache is shared across the whole PIXI object. * - * @param texture - The Texture to add to the cache. - * @param id - The id that the texture will be stored against. + * @param texture The Texture to add to the cache. + * @param id The id that the texture will be stored against. */ static addTextureToCache(texture: Texture, id: string): void; /** * Remove a texture from the global PIXI.TextureCache. * - * @param id - The id of the texture to be removed - * @return - The texture that was removed + * @param id The id of the texture to be removed + * @return The texture that was removed */ static removeTextureFromCache(id: string): Texture; @@ -3566,10 +3566,10 @@ stage.addChild(sprite); * A texture stores the information that represents an image or part of an image. It cannot be added * to the display list directly. Instead use it as the texture for a PIXI.Sprite. If no frame is provided then the whole image is used. * - * @param baseTexture - The base texture source to create the texture from - * @param frame - The rectangle frame of the texture to show - * @param crop - The area of original texture - * @param trim - Trimmed texture rectangle + * @param baseTexture The base texture source to create the texture from + * @param frame The rectangle frame of the texture to show + * @param crop The area of original texture + * @param trim Trimmed texture rectangle */ constructor(baseTexture: BaseTexture, frame?: Rectangle, crop?: Rectangle, trim?: Rectangle); @@ -3634,14 +3634,14 @@ stage.addChild(sprite); /** * Destroys this texture * - * @param destroyBase - Whether to destroy the base texture as well + * @param destroyBase Whether to destroy the base texture as well */ destroy(destroyBase: boolean): void; /** * Specifies the region of the baseTexture that this texture will use. * - * @param frame - The frame of the texture to set it to + * @param frame The frame of the texture to set it to */ setFrame(frame: Rectangle): void; @@ -3657,9 +3657,9 @@ stage.addChild(sprite); /** * A tiling sprite is a fast way of rendering a tiling image * - * @param texture - the texture of the tiling sprite - * @param width - the width of the tiling sprite - * @param height - the height of the tiling sprite + * @param texture the texture of the tiling sprite + * @param width the width of the tiling sprite + * @param height the height of the tiling sprite */ constructor(texture: Texture, width: number, height: number); @@ -3700,14 +3700,14 @@ stage.addChild(sprite); /** * * - * @param forcePowerOfTwo - Whether we want to force the texture to be a power of two + * @param forcePowerOfTwo Whether we want to force the texture to be a power of two */ generateTilingTexture(forcePowerOfTwo: boolean): void; /** * Sets the texture of the sprite * - * @param texture - The PIXI texture that is displayed by the sprite + * @param texture The PIXI texture that is displayed by the sprite */ setTexture(texture: Texture): void; @@ -3848,27 +3848,27 @@ stage.addChild(sprite); /** * Mimic Pixi BaseTexture.from.... method. * - * @param video - - - * @param scaleMode - See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values - * @return - + * @param video - + * @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values + * @return */ static baseTextureFromVideo(video: HTMLVideoElement, scaleMode: number): BaseTexture; /** * Mimic Pixi BaseTexture.from.... method. * - * @param video - - - * @param scaleMode - See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values - * @return - A Texture, but not a VideoTexture. + * @param video - + * @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values + * @return A Texture, but not a VideoTexture. */ static textureFromVideo(video: HTMLVideoElement, scaleMode: number): Texture; /** * Mimic Pixi BaseTexture.from.... method. * - * @param videoSrc - The URL for the video. - * @param scaleMode - See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values - * @return - + * @param videoSrc The URL for the video. + * @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values + * @return */ static fromUrl(videoSrc: string, scaleMode: number): Texture; @@ -3899,14 +3899,14 @@ stage.addChild(sprite); /** * Sets-up the given blendMode from WebGL's point of view. * - * @param blendMode - the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD + * @param blendMode the blendMode, should be a Pixi const, such as PIXI.BlendModes.ADD */ setBlendMode(blendMode: number): boolean; /** * Sets the WebGL Context. * - * @param gl - the current WebGL drawing context + * @param gl the current WebGL drawing context */ setContext(gl: WebGLRenderingContext): void; @@ -3945,8 +3945,8 @@ stage.addChild(sprite); /** * * - * @param spriteBatch - - - * @param renderSession - - + * @param spriteBatch - + * @param renderSession - */ begin(spriteBatch: SpriteBatch, renderSession: RenderSession): void; destroy(removeView?: boolean): void; @@ -3955,21 +3955,21 @@ stage.addChild(sprite); /** * * - * @param spriteBatch - - + * @param spriteBatch - */ render(spriteBatch: SpriteBatch): void; /** * * - * @param sprite - - + * @param sprite - */ renderSprite(sprite: Sprite): void; /** * Sets the WebGL Context. * - * @param gl - the current WebGL drawing context + * @param gl the current WebGL drawing context */ setContext(gl: WebGLRenderingContext): void; start(): void; @@ -3988,18 +3988,18 @@ stage.addChild(sprite); /** * Applies the filter to the specified area. * - * @param filter - the filter that needs to be applied - * @param filterArea - TODO - might need an update - * @param width - the horizontal range of the filter - * @param height - the vertical range of the filter + * @param filter the filter that needs to be applied + * @param filterArea TODO - might need an update + * @param width the horizontal range of the filter + * @param height the vertical range of the filter */ applyFilterPass(filter: AbstractFilter, filterArea: Texture, width: number, height: number): void; /** * * - * @param renderSession - - - * @param buffer - - + * @param renderSession - + * @param buffer - */ begin(renderSession: RenderSession, buffer: ArrayBuffer): void; @@ -4021,14 +4021,14 @@ stage.addChild(sprite); /** * Applies the filter and adds it to the current filter stack. * - * @param filterBlock - the filter that will be pushed to the current filter stack + * @param filterBlock the filter that will be pushed to the current filter stack */ pushFilter(filterBlock: FilterBlock): void; /** * Initialises the context and the properties. * - * @param gl - the current WebGL drawing context + * @param gl the current WebGL drawing context */ setContext(gl: WebGLRenderingContext): void; @@ -4046,40 +4046,40 @@ stage.addChild(sprite); /** * Renders the graphics object * - * @param graphics - - - * @param renderSession - - + * @param graphics - + * @param renderSession - */ static renderGraphics(graphics: Graphics, renderRession: RenderSession): void; /** * Updates the graphics object * - * @param graphicsData - The graphics object to update - * @param gl - the current WebGL drawing context + * @param graphicsData The graphics object to update + * @param gl the current WebGL drawing context */ static updateGraphics(graphics: Graphics, gl: WebGLRenderingContext): void; /** * * - * @param webGL - - - * @param type - - + * @param webGL - + * @param type - */ static switchMode(webGL: WebGLRenderingContext, type: number): any; //WebGLData /** * Builds a rectangle to draw * - * @param graphicsData - The graphics object containing all the necessary properties - * @param webGLData - - + * @param graphicsData The graphics object containing all the necessary properties + * @param webGLData - */ static buildRectangle(graphicsData: GraphicsData, webGLData: any): void; /** * Builds a rounded rectangle to draw * - * @param graphicsData - The graphics object containing all the necessary properties - * @param webGLData - - + * @param graphicsData The graphics object containing all the necessary properties + * @param webGLData - */ static buildRoundedRectangle(graphicsData: GraphicsData, webGLData: any): void; @@ -4087,45 +4087,45 @@ stage.addChild(sprite); * Calculate the points for a quadratic bezier curve. (helper function..) * Based on: https://stackoverflow.com/questions/785097/how-do-i-implement-a-bezier-curve-in-c * - * @param fromX - Origin point x - * @param fromY - Origin point x - * @param cpX - Control point x - * @param cpY - Control point y - * @param toX - Destination point x - * @param toY - Destination point y - * @return - + * @param fromX Origin point x + * @param fromY Origin point x + * @param cpX Control point x + * @param cpY Control point y + * @param toX Destination point x + * @param toY Destination point y + * @return */ static quadraticBezierCurve(fromX: number, fromY: number, cpX: number, cpY: number, toX: number, toY: number): number[]; /** * Builds a circle to draw * - * @param graphicsData - The graphics object to draw - * @param webGLData - - + * @param graphicsData The graphics object to draw + * @param webGLData - */ static buildCircle(graphicsData: GraphicsData, webGLData: any): void; /** * Builds a line to draw * - * @param graphicsData - The graphics object containing all the necessary properties - * @param webGLData - - + * @param graphicsData The graphics object containing all the necessary properties + * @param webGLData - */ static buildLine(graphicsData: GraphicsData, webGLData: any): void; /** * Builds a complex polygon to draw * - * @param graphicsData - The graphics object containing all the necessary properties - * @param webGLData - - + * @param graphicsData The graphics object containing all the necessary properties + * @param webGLData - */ static buildComplexPoly(graphicsData: GraphicsData, webGLData: any): void; /** * Builds a polygon to draw * - * @param graphicsData - The graphics object containing all the necessary properties - * @param webGLData - - + * @param graphicsData The graphics object containing all the necessary properties + * @param webGLData - */ static buildPoly(graphicsData: GraphicsData, webGLData: any): boolean; @@ -4165,23 +4165,23 @@ stage.addChild(sprite); /** * Removes the last filter from the filter stack and doesn't return it. * - * @param maskData - - - * @param renderSession - an object containing all the useful parameters + * @param maskData - + * @param renderSession an object containing all the useful parameters */ popMask(renderSession: RenderSession): void; /** * Applies the Mask and adds it to the current filter stack. * - * @param maskData - - - * @param renderSession - - + * @param maskData - + * @param renderSession - */ pushMask(maskData: any[], renderSession: RenderSession): void; /** * Sets the drawing context to the one given in parameter. * - * @param gl - the current WebGL drawing context + * @param gl the current WebGL drawing context */ setContext(gl: WebGLRenderingContext): void; @@ -4205,9 +4205,9 @@ stage.addChild(sprite); * So no need for Sprite Batches or Sprite Clouds. * Don't forget to add the view to your DOM or you will not see anything :) * - * @param width - the width of the canvas view - Default: 0 - * @param height - the height of the canvas view - Default: 0 - * @param options - The optional renderer parameters + * @param width the width of the canvas view - Default: 0 + * @param height the height of the canvas view - Default: 0 + * @param options The optional renderer parameters */ constructor(width?: number, height?: number, options?: PixiRendererOptions); @@ -4316,31 +4316,31 @@ stage.addChild(sprite); /** * Renders the stage to its webGL view * - * @param stage - the Stage element to be rendered + * @param stage the Stage element to be rendered */ render(stage: Stage): void; /** * Renders a Display Object. * - * @param displayObject - The DisplayObject to render - * @param projection - The projection - * @param buffer - a standard WebGL buffer + * @param displayObject The DisplayObject to render + * @param projection The projection + * @param buffer a standard WebGL buffer */ renderDisplayObject(displayObject: DisplayObject, projection: Point, buffer: WebGLBuffer): void; /** * Resizes the webGL view to the specified width and height. * - * @param width - the new width of the webGL view - * @param height - the new height of the webGL view + * @param width the new width of the webGL view + * @param height the new height of the webGL view */ resize(width: number, height: number): void; /** * Updates and Creates a WebGL texture for the renderers context. * - * @param texture - the texture to update + * @param texture the texture to update */ updateTexture(texture: Texture): void; @@ -4362,21 +4362,21 @@ stage.addChild(sprite); /** * Takes the attributes given in parameters. * - * @param attribs - attribs + * @param attribs attribs */ setAttribs(attribs: ShaderAttribute[]): void; /** * Initialises the context and the properties. * - * @param gl - the current WebGL drawing context + * @param gl the current WebGL drawing context */ setContext(gl: WebGLRenderingContext): void; /** * Sets the current shader. * - * @param shader - - + * @param shader - */ setShader(shader: IPixiShader): boolean; @@ -4392,9 +4392,9 @@ stage.addChild(sprite); /** * TODO this does not belong here! * - * @param graphics - - - * @param webGLData - - - * @param renderSession - - + * @param graphics - + * @param webGLData - + * @param renderSession - */ bindGraphics(graphics: Graphics, webGLData: any[], renderSession: RenderSession): void; @@ -4406,9 +4406,9 @@ stage.addChild(sprite); /** * * - * @param graphics - - - * @param webGLData - - - * @param renderSession - - + * @param graphics - + * @param webGLData - + * @param renderSession - */ popStencil(graphics: Graphics, webGLData: any[], renderSession: RenderSession): void; pushStencil(graphics: Graphics, webGLData: any[], renderSession: RenderSession): void; @@ -4416,7 +4416,7 @@ stage.addChild(sprite); /** * Sets the drawing context to the one given in parameter. * - * @param gl - the current WebGL drawing context + * @param gl the current WebGL drawing context */ setContext(gl: WebGLRenderingContext): void; @@ -4465,7 +4465,7 @@ stage.addChild(sprite); /** * * - * @param renderSession - The RenderSession object + * @param renderSession The RenderSession object */ begin(renderSession: RenderSession): void; @@ -4483,23 +4483,23 @@ stage.addChild(sprite); /** * * - * @param sprite - the sprite to render when using this spritebatch + * @param sprite the sprite to render when using this spritebatch */ render(sprite: Sprite): void; /** * * - * @param texture - - - * @param size - - - * @param startIndex - - + * @param texture - + * @param size - + * @param startIndex - */ renderBatch(texture: Texture, size: number, startIndex: number): void; /** * Renders a TilingSprite using the spriteBatch. * - * @param sprite - the tilingSprite to render + * @param sprite the tilingSprite to render */ renderTilingSprite(sprite: TilingSprite): void; setBlendMode(blendMode: blendModes): void; @@ -4507,7 +4507,7 @@ stage.addChild(sprite); /** * * - * @param gl - the current WebGL drawing context + * @param gl the current WebGL drawing context */ setContext(gl: WebGLRenderingContext): void; start(): void; @@ -4561,11 +4561,11 @@ stage.addChild(sprite); * doc.addChild(sprite); * renderTexture.render(doc); // Renders to center of renderTexture * - * @param width - The width of the render texture - * @param height - The height of the render texture - * @param renderer - The renderer used for this RenderTexture - * @param scaleMode - See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values - * @param resolution - The resolution of the texture being generated + * @param width The width of the render texture + * @param height The height of the render texture + * @param renderer The renderer used for this RenderTexture + * @param scaleMode See {{#crossLink "PIXI/scaleModes:property"}}PIXI.scaleModes{{/crossLink}} for possible values + * @param resolution The resolution of the texture being generated */ constructor(width?: number, height?: number, renderer?: PixiRenderer, scaleMode?: scaleModes, resolution?: number); @@ -4599,28 +4599,28 @@ stage.addChild(sprite); /** * Will return a a base64 encoded string of this texture. It works by calling RenderTexture.getCanvas and then running toDataURL on that. - * @return - A base64 encoded string of the texture. + * @return A base64 encoded string of the texture. */ getBase64(): string; /** * Creates a Canvas element, renders this RenderTexture to it and then returns it. - * @return - A Canvas element with the texture rendered on. + * @return A Canvas element with the texture rendered on. */ getCanvas(): HTMLCanvasElement; /** * Will return a HTML Image of the texture - * @return - + * @return */ getImage(): HTMLImageElement; /** * Resizes the RenderTexture. * - * @param width - The width to resize to. - * @param height - The height to resize to. - * @param updateBase - Should the baseTexture.width and height values be resized as well? + * @param width The width to resize to. + * @param height The height to resize to. + * @param updateBase Should the baseTexture.width and height values be resized as well? */ resize(width: number, height: number, updateBase: boolean): void; render(displayObject: DisplayObject, position?: Point, clear?: boolean): void; @@ -5070,7 +5070,7 @@ stage.addChild(sprite); * Spine animation data needs to be loaded using the PIXI.AssetLoader or PIXI.SpineLoader before it can be used by this class * See example 12 (http://www.goodboydigital.com/pixijs/examples/12/) to see a working example and check out the source * - * @param url - The url of the spine anim file to be used + * @param url The url of the spine anim file to be used */ constructor(url: string); @@ -5094,15 +5094,15 @@ stage.addChild(sprite); /** * Create a new sprite to be used with spine.RegionAttachment * - * @param slot - The slot to which the attachment is parented - * @param attachment - The attachment that the sprite will represent + * @param slot The slot to which the attachment is parented + * @param attachment The attachment that the sprite will represent */ createSprite(slot: Slot, descriptor: { name: string }): Sprite[]; /** * Update the spine skeleton and its animations by delta time (dt) * - * @param dt - Delta time. Time by which the animation should be updated + * @param dt Delta time. Time by which the animation should be updated */ update(dt: number): void;